New Release: microlog 5.1.0

Andrei Gramakov - Sep 15 - - Dev Community

preview

Here is a new version of microlog with improved custom callback handling.

It is not always simple to redirect printf output on some platforms. For this in the last release, I’ve added a new ulog_add_callback function.

void arduino_callback(ulog_Event *ev, void *arg) {
    static char buffer[128];
    ulog_event_to_cstr(ev, buffer, sizeof(buffer));
    Serial.println(buffer);
}

...

ulog_add_callback(arduino_callback, NULL, LOG_INFO);
Enter fullscreen mode Exit fullscreen mode

microlog is a C-based thread-save portable and customizable logging library, aiming to provide powerful functionality while keeping the usage intuitive and the learning curve shallow. microlog can be quickly integrated to any project by copying 2 files or as a meson/cmake subproject.

Sources: https://github.com/an-dr/microlog

.
Terabox Video Player