Crate censer

Crate censer 

Source
Expand description

§Smelt

Beautiful, structured logging for the terminal.

Smelt is the Rust equivalent of log from Charmbracelet. It provides gorgeous, human-readable log output.

§Quick Start

use smelt::{info, warn, error, debug, Logger};

// Quick logging
info!("Server started");
warn!("Low disk space");
error!("Connection failed");

// With key-value pairs
info!("Request received"; "method" => "GET", "path" => "/api/users");

// Custom logger
let logger = Logger::new()
    .with_timestamp()
    .with_icons();

logger.info("Application started");

Modules§

prelude
Prelude for convenient imports.

Macros§

debug
Log at debug level.
error
Log at error level.
fatal
Log at fatal level.
info
Log at info level.
warn
Log at warn level.

Structs§

LogStyle
Styling options for log output.
Logger
A styled logger.

Enums§

Level
Log level.

Functions§

global_logger
Get or initialize the global logger.