Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
log.hpp File Reference

Logging system umbrella header. More...

Detailed Description

Logging system umbrella header.

Includes all logging components:

Quick start: // 1. Define output sink struct UartOut { static void write(const char* s) { uart_puts(s); } };

// 2. Define timestamp provider struct SysTime { static uint32_t now() { return millis(); } };

// 3. Configure before including macros #define SBL_LOG_OUTPUT UartOut #define SBL_LOG_TIMESTAMP SysTime #define SBL_LOG_LEVEL SBL_LOG_LEVEL_DEBUG #include <sbl/common/log/macros.hpp>

// 4. Use SBL_LOG_INFO("Hello %s", "world"); // Output: I 12345 main.cpp:42| Hello world

Definition in file log.hpp.

Go to the source code of this file.