logos.std.log
Module std · package logos-std
Functions
fndebug
fn debug(msg: &[u8]) -> void
Logs msg at the DEBUG level.
fnDEBUG
fn DEBUG() -> i32
Returns the DEBUG level code (1).
fnemit
fn emit(level: i32, msg: &[u8]) -> void
Writes msg to stderr as one line prefixed with the level name.
Silently dropped when level is below threshold(). Short writes are retried;
write errors are ignored.
fnerror
fn error(msg: &[u8]) -> void
Logs msg at the ERROR level.
fnERROR
fn ERROR() -> i32
Returns the ERROR level code (4).
fninfo
fn info(msg: &[u8]) -> void
Logs msg at the INFO level.
fnINFO
fn INFO() -> i32
Returns the INFO level code (2), the default threshold.
fnlog_kv_i64
fn log_kv_i64(level: i32, msg: &[u8], key: &[u8], value: i64) -> void
Writes msg followed by a key=value pair (integer) to stderr as one line.
Silently dropped when level is below threshold().
fnlog_kv_str
fn log_kv_str(level: i32, msg: &[u8], key: &[u8], value: &[u8]) -> void
Writes msg followed by a key="value" pair to stderr as one line.
Silently dropped when level is below threshold(). value is quoted but
NOT escaped — embedded " or newlines pass through verbatim.
fnOFF
fn OFF() -> i32
Returns the OFF level code (100); as a threshold it suppresses all messages.
fnthreshold
fn threshold() -> i32
Returns the current minimum log level, read from the LOGOS_LOG env variable.
Recognizes TRACE/DEBUG/INFO/WARN/ERROR/OFF (case-insensitive); unset or
unrecognized values yield INFO(). Re-reads the environment on every call.
fntrace
fn trace(msg: &[u8]) -> void
Logs msg at the TRACE level.
fnTRACE
fn TRACE() -> i32
Returns the TRACE level code (0), the most verbose level.
fnwarn
fn warn(msg: &[u8]) -> void
Logs msg at the WARN level.
fnWARN
fn WARN() -> i32
Returns the WARN level code (3).