DEV Community

Andrei Gramakov
Andrei Gramakov

Posted on • Originally published at agramakov.me on

New Release: microlog 5.1.0

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

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs