2024-06-11 20:03:10 -04:00
2024-06-16 18:52:05 -04:00
2024-06-16 18:52:05 -04:00
2024-06-16 11:07:24 -07:00
2024-06-14 12:48:25 -04:00
2024-06-16 18:52:05 -04:00
2024-06-14 13:01:32 -04:00

jlog - Just Barely Logging

jlog is a C++ library for logging to file, console, and event callbacks.

Static Badge

Features

  • Modern (C++20)
  • Static Library
  • Color Output
  • Logs to file AND console!
  • Idiomatic Event callback for hooking into your game engine gui!

Installation

Include this repository as a CPM dependency, and link against the library. (TODO: Show the relevant CMake script lines.)

CPMAddPackage(
        NAME jlog
        URL https://git.redacted.cc/josh/jlog/archive/Prerelease-2.zip
)
# ...
include_directories(${jlog_SOURCE_DIR}/include)
# ...
target_link_libraries(YourProgram ... jlog)


Using jlog is straightforward:


#include <jlog.h>

int main() {
    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...

TODO

  • Custom Contexts: Allow users to specify custom logging contexts for better organization.
    • Disable & sort by context (other categories?)
  • Custom Formats: Add support for custom log message formats.
  • Documentation
  • Thread Safety
  • Memory Safety
  • Stream Support
  • Identify File, Line, Function name via macros (I hate macros!!!)

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.

Description
Yet Another C++ Logging Library
Readme 406 KiB
Languages
C++ 86.4%
CMake 13.6%