Skip to content

c-logger

https://github.com/standardloop/c-logger

GitHub Release C Version

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:

  • JSON logs or Normal Logs
  • Add a date to the log.
  • Log levels
  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
  • 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;
}