Skip to content

A lightweight logging library written in C (Gitlab mirror)

License

Notifications You must be signed in to change notification settings

roguesensei/clogger

Repository files navigation

clogger

Latest Release MIT License Build

A lightweight functional logging library written in C

For clarification, it's pronounced "C logger".

Getting Started

All the tools you need are contained within a single header: clogger.h. Just include it in your C/C++ project and call the standard clog_message function, which takes a location (typically the function name) and a message as parameters.

The message parameter supports C style formatted strings like a standard printf() would.

#include <clogger.h>

int main()
{
    clog_message(__FUNCTION__, "Greetings, universe!");

    char some_string[] = "bit";
    int some_num = 8;

    clog_message("I also support string formatting", "Mario looks good in %i-%s", some_num, some_string);

    return 0;
}

Documentation

For guides on usage, examples and compiling, please refer to the clogger wiki

For the detailed API reference, please visit rs-clogger.readthedocs.io

Credit

Using jothepro/doxygen-awesome-css as theme for API Reference, generated using Doxygen.