use zlogger::{init, init_with_config, Config, LogLevel, OutputTarget};
use zlogger::{trace, debug, info, warn, error};
fn main() {
println!("=== Basic Usage Example ===");
init();
info!("Logger initialized with default settings");
debug!("This is a debug message");
warn!("This is a warning message");
error!("This is an error message");
println!("\n=== Custom Configuration Example ===");
let config = Config::default()
.level(LogLevel::Debug)
.output(OutputTarget::Both)
.file_path("example.log")
.max_file_size(1024 * 1024) .max_files(3)
.use_colors(true);
println!("Custom config created: {:?}", config);
trace!("This trace message might not appear depending on log level");
debug!("Debug: Application state: {}", "running");
info!("Info: Processing {} items", 42);
warn!("Warning: Low disk space: {}%", 85);
error!("Error: Failed to connect to database: {}", "connection timeout");
let user = "Alice";
let count = 10;
info!("User {} has {} items in cart", user, count);
println!("\nCheck 'example.log' if file output was configured!");
}