Sound Byte Libs 0.5.1-340-gab5b79a
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
// 4. Use
SBL_LOG_INFO("Hello %s", "world");
// Output: I 12345 main.cpp:42| Hello world
Zero-overhead logging macros with file/line capture.
uint32_t millis()
Definition timer.hpp:65

Definition in file log.hpp.

Go to the source code of this file.