c-logger
https://github.com/standardloop/c-logger
About
c-logger is a small logger dynamic library.
Right now, it is essentially a wrapper around fprintf.
I use it for many of my projects.
It supports:
JSONlogs or Normal Logs- Add a date to the log.
- Log levels
TRACEDEBUGINFOWARNERRORPANICFATAL- Color Output
Usage
Example Program
#include <stdlib.h>
#include <stdio.h>
#include <standardloop/logger.h>
int main(void)
{
InitLoggerEasy(StringToLogLevel("TRACE"));
Log(TRACE, "hello %s", "world");
return EXIT_SUCCESS;
}
Available Tasks
task: Available tasks for this project:
* default Show all avaiable tasks.
* release
* test
* test:build
* test:run
* clean
* fmt
* docs
Docs
Docs are generated a first generated with doxygen as xml and then moxygen reads the xml to output markdown in the docs/ folder.
This repo uses reusable tasks from https://github.com/standardloop/taskfiles/
Precommit
This repo uses prek.
Please run prek install.