result_logger

Crates.ioresult_logger
lib.rsresult_logger
version0.1.1
created_at2025-02-23 10:29:56.685207+00
updated_at2025-02-23 10:34:18.030144+00
descriptionaux functions for Results to log errors
homepage
repository
max_upload_size
id1566225
size5,893
(Lukas-Heiligenbrunner)

documentation

README

result_logger

Rust crate to ease the logging of error results.

Just call the provided log funtions on Results and if its an error it gets logged by your logging implementation.

Available functions

Usage

fn calling_func() -> Result<(), String> {
    failing_func().error()?;
    
    // Do something
    
    Ok(())
}

fn failing_func() -> Result<(), String> {
    Err("This is an error".to_string())
}

-> This will log the error message "This is an error" with the log level Error.

License

This project is licensed under the MIT License. Feel free to contribute and modify as per the guidelines outlined in the license agreement.

Commit count: 0

cargo fmt