Alex Skov Jensen's ElogPlus Offers Powerful Logging Features for Espressif ESP32 Projects

With eight log levels, real timestamps, ultra-fast logging, and a built-in browsers, ElogPlus handles your data logging with care.

Gareth Halfacree
4 months agoProductivity

Embedded developer Alex Skov Jensen has put together a tool for those who need to log data on an Espressif ESP32, with or without access to external storage: the ElogPlus library.

"The ElogPlus library is a powerful library for logging and monitoring events in your Arduino ESP32 applications," Jensen explains of his creation. "Logging is fast because messages are queued in your app, and then handled later in background by the logging library. If a message is not outputted it takes around 0.5μs. If a message is outputted it typically takes around 25μs."

The library, which is only compatible with Espressif ESP32 family microcontrollers, is designed to allow for the easy logging of data with eight priority levels: DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY. Messages at the chosen level or above can be selected for output to a range of devices: an SD Card connected to the microcontroller; the system log; a serial port; or the ESP32's internal SPIFFS EEPROM. "Don't be afraid of wearing it down," Jensen says of this last option. "I have logged a gigabyte to a single ESP[32] without problems."

The library also offers a range of other quality-of-life features, including automatic deletion of the oldest records when the storage device becomes full; clock time stamping from a real-time clock (RTC) or network time server (NTP); an integrated microsecond-resolution timer; and a built-in log browser that allows access to the logs even while the microcontroller is still running your program.

Jensen has released ElogPlus on GitHub under the permissive Apache 2.0 license; it is also available under the name Elog in the Arduino IDE Library Manager and PlatformIO.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles