14#if PC_LOG_LEVEL < PC_LOG_LEVEL_NONE
27static LogCtx s_log = {
nullptr};
34void pc_log_frame(uint8_t level,
const pc_field *spec, ...)
56 s_log.sink(level, line);
PC_OPTIMIZE_O2 size_t pc_frame_vbuild(char *out, size_t cap, const pc_field *spec, va_list ap)
va_list form, for a caller that already has one.
Abstract logging whose disabled levels cost nothing at all (PC_LOG_LEVEL).
void(* pc_log_sink_fn)(uint8_t level, const char *line)
Receives an emitted line, already formatted. level is a PC_LOG_LEVEL_* value.
Fixed-RAM rotating log buffer with severity traps (PC_ENABLE_LOGBUF).
#define PC_LOG_LINE_LEN
Maximum length of one stored log line (bytes, including null).
One field of a frame. Frames are static const pc_field[], so they live in rodata.