explaingit

armink/easylogger

4,602CAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A tiny C and C++ logging library for microcontrollers and IoT devices, using under 1.6KB of storage and 0.3KB of RAM, with 6 severity levels, color-coded terminal output, tag-based filtering, and pluggable log destinations.

Mindmap

mindmap
  root((repo))
    What it does
      Embedded logging
      C and C++ library
    Log levels
      Assert to Verbose
      Color-coded output
    Features
      Tag filtering
      Async output
      Flash storage plugin
    Platforms
      RT-Thread
      Linux Windows
      Bare-metal
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add color-coded, filterable log output to a bare-metal microcontroller with almost no memory overhead

USE CASE 2

Filter debug messages by tag or keyword at runtime without recompiling your firmware

USE CASE 3

Save log entries directly to Flash memory on devices with no file system using the built-in plugin

USE CASE 4

Enable async log output so logging doesn't slow down time-critical code on slow UART connections

Tech stack

CC++

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a platform porting step to connect EasyLogger's output interface to your hardware's UART or serial channel.

Free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
I'm adding logging to an RT-Thread project using armink/easylogger. Show me how to initialize the library and write an error log that includes the file name and line number.
Prompt 2
Using EasyLogger from armink/easylogger, how do I filter log output to show only messages with a specific tag while the device is running, without rebuilding?
Prompt 3
I want to save EasyLogger output to Flash memory on a device with no file system. Walk me through enabling and configuring the Flash storage plugin.
Prompt 4
Help me configure armink/easylogger for async output so debug prints don't stall my main loop when UART is slow.
Open on GitHub → Explain another repo

← armink on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.