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

#766 in Debugging

Download history 7/week @ 2024-07-01 3/week @ 2024-07-08 1/week @ 2024-07-15 18/week @ 2024-07-22 21/week @ 2024-07-29 22/week @ 2024-08-05 19/week @ 2024-08-12 9/week @ 2024-08-19 4/week @ 2024-08-26 4/week @ 2024-09-09 11/week @ 2024-09-16 79/week @ 2024-09-23 22/week @ 2024-09-30 20/week @ 2024-10-07 30/week @ 2024-10-14

152 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

~87KB