The library can be linked as a CMake project, Meson subproject or can be added manually: copy ulog.c and ulog.h into your project and compiled along with it.
The current logging level can be set by using the ulog_set_level() function. All logs below the given level will not be written to stderr. By default the level is LOG_TRACE, such that nothing is ignored.
Quiet-mode can be enabled by passing true to the ulog_set_quiet() function. While this mode is enabled the library will not output anything to stderr, but will continue to write to files and callbacks if any are set.
If the log will be written to from multiple threads a lock function can be set. To do this use the ulog_set_lock() function. The function is passed the boolean true if the lock should be acquired or false if the lock should be released and the given udata value.
Note: You might want to adjust the compiler argument -fmacro-prefix-map=OLD_PATH=NEW_PATH to to get the right file paths, e.g. for meson: