pub fn init()Expand description
Initialize the logging subsystem
§Logging Strategy
- With debug-logging feature: Always log to file at DEBUG level
- With RUST_LOG env var: Log to file at specified level
- Otherwise: SILENT (no logging subscriber initialized)
§Critical Guarantee
Release builds are SILENT by default - no log output at all unless explicitly requested via RUST_LOG environment variable or debug-logging feature.
When logging IS enabled, ALL OUTPUT GOES TO STDERR, NEVER STDOUT.
This is enforced by .with_writer(std::io::stderr) on all fmt() calls.
This ensures that commands like sesame --print-config > file.toml
produce clean TOML files without log contamination.
§Fallback Behavior
If file logging is requested but the log file path cannot be determined or the file cannot be opened, the function falls back to stderr logging with a warning message.