4 releases (2 breaking)

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

#807 in Debugging

Download history 3/week @ 2024-08-25 1/week @ 2024-09-01 2/week @ 2024-09-08 12/week @ 2024-09-15 77/week @ 2024-09-22 24/week @ 2024-09-29 20/week @ 2024-10-06 29/week @ 2024-10-13 12/week @ 2024-10-20 7/week @ 2024-11-03 6/week @ 2024-11-10 16/week @ 2024-11-17 8/week @ 2024-11-24 36/week @ 2024-12-01 35/week @ 2024-12-08

95 downloads per month
Used in 3 crates

MIT license

9KB
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

~86KB