Add color-coded, filterable log output to a bare-metal microcontroller with almost no memory overhead
Filter debug messages by tag or keyword at runtime without recompiling your firmware
Save log entries directly to Flash memory on devices with no file system using the built-in plugin
Enable async log output so logging doesn't slow down time-critical code on slow UART connections
Requires a platform porting step to connect EasyLogger's output interface to your hardware's UART or serial channel.
EasyLogger is a tiny C and C++ logging library built for devices where memory is tight, such as IoT sensors, wearables, and smart home hardware. It uses less than 1.6 kilobytes of program storage and less than 0.3 kilobytes of working memory at runtime, making it practical for microcontrollers that have very little space to spare. The library records messages at six severity levels, following a scale similar to Android's logging system: Assert, Error, Warn, Info, Debug, and Verbose. Each level gets its own color in terminal output, so a developer can visually scan a log quickly. Messages can include timestamps, thread information, file paths, line numbers, and method names, and the format for each severity level can be set independently. Filtering is built in. A developer can narrow the visible log output by severity level, by a tag they attach to a group of messages, or by a keyword search. This makes it easier to find relevant entries in a busy stream of output. Logging can also be turned on or off dynamically while the program is running, not just at compile time. For where logs go, EasyLogger lets the developer plug in any destination through a simple porting interface. The core library covers terminal output. Optional plugins handle writing to files with automatic rotation and saving directly to Flash memory without needing a file system, which matters for small embedded devices. Asynchronous output is available so that logging does not slow down the main program on platforms with slow output channels. The README and all documentation are written in Chinese. The library supports several operating systems including RT-Thread, UCOS, Linux, Windows, and Nuttx, and also works on bare-metal platforms with no operating system. It is released under the MIT license.
← armink on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.