Expand description
Scribe — Robonix unified logging facade.
Single entry point: log(). Every component calls the same function;
Scribe routes each record to stderr (human-readable) and to a per-tag
JSON-lines file under $SCRIBE_LOG_DIR (or ./logs).
§Quick start
ⓘ
robonix_scribe::init("executor");
robonix_scribe::info!("robonix-executor starting");
robonix_scribe::warn!("retry {}/{}", n, max);The init() call sets a process-wide default tag used by all subsequent
info! / warn! / error! / debug! macro calls. For
per-message dynamic tags, use the lower-level log() function.
Modules§
- format
- Console formatter — logcat-style single-line human-readable output.
- sink
- Per-tag file sink — JSON-lines output, one file per tag.
Macros§
- debug
- Log at DEBUG level using the process-wide default tag set by
init. - error
- Log at ERROR level using the process-wide default tag set by
init. - info
- Log at INFO level using the process-wide default tag set by
init. - warn
- Log at WARN level using the process-wide default tag set by
init.
Structs§
- LogRecord
- A single structured log record.
Enums§
- Level
- Severity level, ordered
Debug < Info < Warn < Error.
Functions§
- debug
- Convenience:
Level::Debug. - error
- Convenience:
Level::Error. - info
- Convenience:
Level::Info. - ingest
- Ingest a captured stdout/stderr line from a child process under
tag. - init
- Set the process-wide default tag. Call once at startup, before any
log call. All
info!/warn!/error!/debug!macros use this tag after it is set. - init_
from_ config - Initialise scribe with the process
tagand apply the on-disk log level from a launch-config JSON — the system component’s manifest config block that rbnx serialises and passes via--config-json. Reads the top-levellogkey (e.g.{"log":"debug"}); a valid level sets the file-sink floor for this process so the level actually reaches the log file (rbnx logs). - log
- Log a record with the given
level,tag, andmsg. - ts_fmt
- Format a nanosecond UNIX timestamp as a local-time readable string:
"YYYY-MM-DD HH:MM:SS.nnnnnnnnn". - ts_
parse - Parse a
ts_fmt-style string back to nanosecond u64. ReturnsNoneon malformed input. - warn
- Convenience:
Level::Warn.