Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #14

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[![Langulus::Logger CI](https://github.com/Langulus/Logger/actions/workflows/ci.yml/badge.svg)](https://github.com/Langulus/Logger/actions/workflows/ci.yml)
# Langulus::Logger
`Langulus::Logger` is a stateful C++23 logger library based on [{fmt} library](https://github.com/fmtlib/fmt), capable of logging to a console and/or and HTML file. It is used in [all other Langulus](https://github.com/Langulus) libraries and plug-ins.
It contains about a dozen highly-inlined variadic functions with different styles for a consistently pretty and easy logging experience.
`Langulus::Logger` is a cross-platform, stateful C++23 logger library based on [{fmt} library](https://github.com/fmtlib/fmt), capable of logging to console and/or HTML files.
It is used in [all other Langulus](https://github.com/Langulus) libraries and plug-ins.
It contains about a dozen inlined variadic functions with different styles for a consistently pretty and easy logging experience.

This is how it looks in Windows 10 Terminal:
### This is how it looks in Windows 10 Terminal:
![Windows Terminal](test/expected_win_console.png)

This is how it looks when logging to a HTML file (Chrome web browser):
### This is how it looks when logging to an HTML file (as seen via Chrome web browser):
![Chrome Browser](test/expected_chrome.png)

# Getting the library
Expand All @@ -15,7 +16,8 @@ If you have CMake 3.28+, the easiest way to get this library is to use `FetchCon
include(FetchContent)
FetchContent_Declare(LangulusLogger
GIT_REPOSITORY https://github.com/Langulus/Logger.git
GIT_TAG main # you should use a specific commit/release, so that you can control when to bump your dependencies
GIT_TAG main # you should use a specific commit/release,
# so that you can control when to bump your dependencies
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(LangulusLogger)
Expand All @@ -24,13 +26,10 @@ Then just link to your target to get all the include directories:
```cmake
target_link_libraries(YourLibrary PUBLIC LangulusLogger)
```
This will also automatically fetch all dependencies - [{fmt}](https://github.com/fmtlib/fmt) and [Langulus::Core](https://github.com/Langulus/Core).

---------------
Alternatively, you can just download and copy the files from `source/` to your build tree, but you will also have to download and copy the dependencies, too. Don't forget to add `Logger.cpp` to your target.
This will also automagically fetch all dependencies: [{fmt}](https://github.com/fmtlib/fmt) and [Langulus::Core](https://github.com/Langulus/Core).

# Using the library
After linking with LangulusLogger, you can include it in your files, and call the required functions, which are located in the `Langulus::Logger` namespace:
After linking with LangulusLogger, you can include it in your files and call the required functions, which are located in the `Langulus::Logger` namespace:
```c++
#include <Logger/Logger.hpp>
using namespace Langulus;
Expand All @@ -43,7 +42,7 @@ int main(int argc, char* argv[]) {
Visit the Wiki for a full list of the [available functions](https://github.com/Langulus/Logger/wiki/API) and [customization points](https://github.com/Langulus/Logger/wiki/Customization-points).

# Considerations
Langulus::Logger's API is unlikely to change drastically - only a couple of additonal features remain to be added.
Langulus::Logger's API is unlikely to change drastically - only a couple of additional features remain to be added.

# Community feedback
I would love feedback and suggestions, please feel free to join the [forum](https://github.com/Langulus/Logger/discussions).
Expand Down