4 releases (2 breaking)

Uses new Rust 2021

new 0.3.1 Dec 6, 2022
0.3.0 Dec 6, 2022
0.2.0 Oct 2, 2022
0.1.0 Sep 27, 2022

#235 in Debugging

Download history 30/week @ 2022-09-22 108/week @ 2022-09-29 46/week @ 2022-10-06 3/week @ 2022-10-20 18/week @ 2022-10-27 5/week @ 2022-11-03 17/week @ 2022-11-10 69/week @ 2022-11-17 33/week @ 2022-11-24 184/week @ 2022-12-01

303 downloads per month

MIT license

8KB
162 lines

trylog

This crate is inspired by tracing-unwrap, and provides inspect and unwrap_or_default series of methods.

It also supports all types implemented Try.

Log level

method level
inspect_or_log* info
unwrap_or_default_log* warn
unwrap_or_log* error

lib.rs:

This crate provides inspect_or_log, unwrap_or_log and unwrap_or_default_log methods on all types implemented [Try]. They are useful if you want to log the error value.

Different log levels are chosen by calling different methods.

method level
inspect_or_log* info
unwrap_or_default_log* warn
unwrap_or_log* error

Dependencies

~87KB