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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay