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

#761 in Debugging

Download history 15/week @ 2024-07-18 19/week @ 2024-07-25 23/week @ 2024-08-01 20/week @ 2024-08-08 11/week @ 2024-08-15 3/week @ 2024-08-22 3/week @ 2024-08-29 1/week @ 2024-09-05 11/week @ 2024-09-12 59/week @ 2024-09-19 38/week @ 2024-09-26 23/week @ 2024-10-03 29/week @ 2024-10-10 13/week @ 2024-10-17 2/week @ 2024-10-24 7/week @ 2024-10-31

54 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

~91KB