use tracing::{debug, error, info, warn};
#[tokio::main]
async fn main() {
custom_tracing_logger::init();
info!("Application starting up");
debug!("This is a debug message");
warn!(
user_id = 12345,
action = "login_attempt",
"User attempting to log in"
);
info!(
request_id = "req-abc123",
method = "GET",
path = "/api/users",
status = 200,
duration_ms = 45,
"HTTP request completed"
);
error!(
error_code = "DB_CONNECTION_FAILED",
retry_count = 3,
"Database connection failed after retries"
);
let user_name = "alice";
let session_id = "sess-xyz789";
info!(
user = user_name,
session = session_id,
event = "user_action",
"User performed an action"
);
info!("Application shutting down");
}