Expand description
Runtime logging — errlog severity surface plus the rt_* macros.
C parity: modules/libcom/src/error/errlog.{c,h}.
The four rt_* macros route through the tracing facade (the
crate’s de-facto logging path) instead of bare eprintln!, so an
application’s tracing subscriber controls level filtering,
formatting, and sinks uniformly.
The errlog-severity API mirrors errlogSevEnum,
errlogSevEnumString, errlogSetSevToLog/errlogGetSevToLog, and
errlogSevPrintf — a record’s error messages can be suppressed
below a configurable severity threshold, exactly as a C IOC does.
Enums§
- Errlog
SevEnum - Error-message severity — C
errlogSevEnum(errlog.h:49-53).
Functions§
- erl_
warning - C
ERL_WARNING(errlog.h:299) — the word an errlog warning line carries, magenta on a terminal console and plain everywhere else. - errlog_
get_ sev_ to_ log - Get the current severity-to-log threshold — C
errlogGetSevToLog(errlog.c:407-415). - errlog_
printf - Emit a pre-formatted message through the errlog facility
unconditionally — C
errlogVprintf/errlogPrintf(errlog.c:333-364), the no-severity variant. - errlog_
set_ sev_ to_ log - Set the severity-to-log threshold — C
errlogSetSevToLog(errlog.c:399-405). Messages with a severity below this value are suppressed. - errlog_
sev_ enum_ string - String representation of an errlog severity.
- errlog_
sev_ printf - Emit a pre-formatted error message at the given severity, suppressed
when
severityis below theerrlog_get_sev_to_logthreshold. - install_
console_ subscriber - Make this process’s diagnostics reach the console, if nothing else has.
- install_
panic_ hook - Route panics through
errlog, in addition to whateverstdalready does. - single_
line - Render
recordso it cannot end or split a line in a line-oriented log.