use inklog::config::GlobalConfig;
use inklog::{InklogConfig, LoggerManager};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let format_string = "[{timestamp}] [{level:>5}] {target} - {message} | {file}:{line}";
let config = InklogConfig {
global: GlobalConfig {
level: "debug".into(),
format: format_string.to_string(),
masking_enabled: true,
},
..Default::default()
};
let _logger = LoggerManager::with_config(config).await?;
log::info!("This message uses the custom format");
log::debug!("Debug messages also use the format");
log::warn!("Warning messages include file and line info");
println!("\nCustom format example completed!");
println!("Format: [timestamp] [LEVEL] target - message | file:line");
Ok(())
}