Skip to main content

Crate cirious_codex_logger

Crate cirious_codex_logger 

Source
Expand description

§Initialization

To begin logging, initialize the system with your preferred dispatcher:

use cirious_codex_logger::{init, StdoutDispatcher, StyledTerminalFormatter};

let formatter = StyledTerminalFormatter;
let dispatcher = Box::new(StdoutDispatcher::new(formatter));

init(dispatcher).expect("Logger already initialized");

Re-exports§

pub use dispatcher::AsyncDispatcher;
pub use dispatcher::Dispatcher;
pub use dispatcher::RollingFileDispatcher;
pub use dispatcher::StderrDispatcher;
pub use dispatcher::StdoutDispatcher;
pub use format::Formatter;
pub use format::HumanReadableFormatter;
pub use format::JsonFormatter;
pub use format::Record;
pub use level::Level;
pub use style::level_color;
pub use style::StyledTerminalFormatter;
pub use log::*;

Modules§

dispatcher
Routing and dispatching mechanisms for log records.
format
Utilities for structuring and serializing log events.
level
Definitions for logging verbosity levels.
log
The core logging macros and global logging entry points.
style
Terminal styling and colorization utilities.

Macros§

debug
Logs a message at the debug level.
error
Logs a message at the error level.
info
Logs a message at the info level.
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.