上面提到了env_logger,并且给了一个示例,这里给出env_logger的用法及源代码。 env_logger——A logging implementation forlogwhich isconfigured via an environment variable. 。也就是说日志配置是通过环境变量实现的,后面会学习到其他logger通过配置文件的方式去进行日志配置,这也是我们最常用的情况。 日志输出定义:...
Supports setting the log level using the environment variable RUST_LOG. official website Github crates.io Simple Usage Description Use tklog [dependencies] tklog = "0.2.9" # "0.x.x" current version The simplest way to use tklog involves direct macro calls: use tklog::{trace, debug, err...
[2020-08-07 22:42:57] [DEBUG][sync_tool] Sentry is enabled thread 'main' panicked at 'Everything is on fire!', src/main.rs:165:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace No event on sentry. Any hints? This is pretty close to a copy-paste...