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

#808 in Debugging

Download history 2/week @ 2024-08-30 1/week @ 2024-09-06 11/week @ 2024-09-13 64/week @ 2024-09-20 36/week @ 2024-09-27 21/week @ 2024-10-04 31/week @ 2024-10-11 11/week @ 2024-10-18 1/week @ 2024-10-25 7/week @ 2024-11-01 5/week @ 2024-11-08 15/week @ 2024-11-15 8/week @ 2024-11-22 31/week @ 2024-11-29 35/week @ 2024-12-06 8/week @ 2024-12-13

85 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