Files
jlog/README.md
2024-08-12 23:21:33 -04:00

74 lines
1.5 KiB
Markdown

# jlog - Just Barely Logging
jlog is a C++ library for logging to file, console, and event callbacks.
![Static Badge](https://img.shields.io/badge/Lit-Based-%20)
## Features
* Modern (C++20)
* Static Library
* Color Output
* Logs to file AND console!
* Idiomatic Event callback for hooking into your game engine gui!
* GCC and MSVC support
## Installation
Include this repository as a CPM dependency, and link against the library.
```cmake
CPMAddPackage(
NAME jlog
URL https://git.redacted.cc/josh/jlog/archive/Prerelease-7.zip
)
# ...
include_directories(${jlog_SOURCE_DIR}/include)
# ...
target_link_libraries(YourProgram ... jlog)
```
# Usage
Using jlog is straightforward:
```cpp
#include <jlog.h>
int main() {
LOGLEVEL(jlog::severity::debug); // <- see jlog::severity for full list of LogTrace levels
info("This is barely useful information.");
debug("Debugging Information");
verbose("Yadda Yadda Yadda");
warning("Slight miscalculation!");
error("Oops, something went wrong.");
fatal("Unrecoverable Error!!!");
return 0;
}
```
## Output
![Should be sample output...](img.png)
## TODO
* Custom Contexts: Allow users to specify custom logging contexts for better organization.
* Disable & sort by context (other categories?)
* Documentation
* Thread Safety
* Memory Safety
* Stream Support
## License
This software is written and developed by Josh O'Leary @ Redacted Software 2024. This work is dedicated to the public domain.
## Contributing
Send'em pull requests.