Repolode
armink

armink/EasyLogger

An ultra-lightweight C/C++ logging library for resource-constrained embedded devices, with filtering, colored output and pluggable outputs.

Stars
4,799
Forks
1,323
Open issues
82
Last commit
2 days ago

What is it?

EasyLogger is a C/C++ logging library designed for resource-sensitive projects such as IoT products, wearables and smart home devices. It targets very small code and RAM footprints, and keeps its interface deliberately small so it is quick to adopt compared with heavier libraries like log4c or zlog.

Log output is user-defined, so messages can go to a terminal, a file, a database, a serial port, RS-485 or flash memory. Each entry can include level, timestamp, thread and process information, and filtering works by tag, level or keyword, both at compile time and at runtime. Levels are shown in distinct colors, and RAW and hexdump formats are supported. The library runs on RT-Thread, uC/OS, Linux, Windows, NuttX and bare-metal platforms, and it offers thread-safe, asynchronous and buffered output modes.

Additional capabilities such as flash-based log storage (via EasyFlash) and file rotation are provided as plugins.

Key features

  • 01Ultra-small footprint, under 1.6K ROM and 0.3K RAM.
  • 02User-defined output targets such as terminal, file, flash, serial or database.
  • 03Static and dynamic filtering by tag, level and keyword.
  • 04Thread-safe, asynchronous and buffered output modes.
  • 05Per-level colored output, plus RAW and hexdump formats.
  • 06Plugins for flash log storage and file rotation.

Use cases

  • Logging on resource-constrained IoT or wearable firmware.
  • Debugging embedded devices on RT-Thread or bare-metal targets.
  • Storing device logs in flash on systems without a filesystem.
  • Adding tag-based log filtering to a large C project.

Quick start

  1. 1

    Read the Chinese docs in docs/zh before porting

  2. 2

    Port the library into your project following docs/zh/port/kernel.md

Things to know

  • There is no package-manager install; you must port the source into your project.
  • The configuration is a global singleton, so complex per-output setups are not supported.
  • The main documentation and README are in Chinese.

In collections

Topics

FAQ

What is EasyLogger?
An ultra-lightweight C/C++ logging library for resource-constrained embedded devices, with filtering, colored output and pluggable outputs. EasyLogger is a C/C++ logging library designed for resource-sensitive projects such as IoT products, wearables and smart home devices. It targets very small code and RAM footprints, and keeps its interface deliberately small so it is quick to adopt compared with heavier libraries like log4c or zlog.
Is EasyLogger free to use? What license does it have?
EasyLogger is open source under the MIT license. Check the license terms before using it in commercial products.
Is EasyLogger still maintained?
Actively maintained. The last commit to EasyLogger was on Nov 5, 2026.
What can I use EasyLogger for?
Logging on resource-constrained IoT or wearable firmware. Debugging embedded devices on RT-Thread or bare-metal targets. Storing device logs in flash on systems without a filesystem. Adding tag-based log filtering to a large C project.
How do I install EasyLogger?
Read the Chinese docs in docs/zh before porting Port the library into your project following docs/zh/port/kernel.md
Where can I get EasyLogger?
The source code and installation instructions are on GitHub: https://github.com/armink/EasyLogger

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects