A powerful, structured logging library for Rust inspired by Logrus. Features thread-safe logging, structured fields, custom formatters, and beautiful terminal output.
useloggix::with_error;usestd::fs::File;usestd::io::Error;fnmain(){// Example 1: Logging a file error
let result =File::open("non_existent.txt");ifletErr(error)= result {with_error(&error).error("Failed to open file").unwrap();}// Example 2: Custom error
let custom_error =Error::new(std::io::ErrorKind::Other,"Database connection failed");with_error(&custom_error).error("Database error occurred").unwrap();}