logging
Provides a custom Logger that writes themed, level-prefixed messages to
stderr, and a serializable LevelFilter enum that integrates with both
the config file ([log] table) and the GEST_LOG__LEVEL environment variable.
enum LevelFilter
pub enum LevelFilterLog level filter mirroring log::LevelFilter with serde and env-var support.
Defaults to Warn. Accepts both named strings ("debug",
"info", …) and numeric levels (0–5) when parsed from environment
variables or config files.
| Variant | Description |
|---|---|
Debug |
Emit debug, info, warn, and error records. |
Error |
Emit error records only. |
Info |
Emit info, warn, and error records. |
Off |
Suppress all log output. |
Trace |
Emit every record, including trace-level diagnostics. |
Warn |
Emit warn and error records (the default). |
Implements Clone, Copy, Debug, Default, Deserialize<'de>, Eq, Hash, PartialEq, Serialize, EnvarParse<LevelFilter>, TryFrom<RawLevel>, From<LevelFilter>.
enum RawLevel
enum RawLevelA log level as a config file or a GEST_ variable writes it: a name in any case, or a number from 0 to 5.
| Variant | Description |
|---|---|
Name(String) |
|
Number(i64) |
Implements Deserialize<'de>, TryFrom<RawLevel>.
struct Logger
pub struct Logger;A minimal Log implementation that writes themed, level-prefixed lines to stderr.
Level prefixes are colored using the active Theme so
they respect user palette and token overrides.
Implements Log.
fn init
pub fn init(level: LevelFilter)Install the global Logger and set the initial max log level.
The level may be adjusted later (e.g. after config is loaded) via
log::set_max_level. Repeated calls to log::set_logger are
harmless — only the first succeeds.
| Parameter | Type | Description |
|---|---|---|
level |
LevelFilter | the most verbose level to emit until it is changed |