tracing: pub 导出常用函数及宏
Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
This commit is contained in:
parent
ee16adb37f
commit
edfeda766e
@ -7,6 +7,9 @@ pub mod util;
|
||||
/// 包含了一些常用的文件操作函数
|
||||
pub mod file;
|
||||
|
||||
/// 重新导出 tracing 中常用的日志宏,以及 tracing_subscriber 里的格式化和环境过滤器
|
||||
pub mod tracing;
|
||||
|
||||
/// 定义 crate::Error
|
||||
/// 大部分函数返回的错误
|
||||
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||
|
5
src/tracing.rs
Normal file
5
src/tracing.rs
Normal file
@ -0,0 +1,5 @@
|
||||
/// 引入 tracing 库中的常用宏,用于写入不同级别的日志
|
||||
pub use tracing::{debug, error, info, trace, warn};
|
||||
|
||||
/// 引入 tracing_subscriber 库中的格式化和环境过滤器
|
||||
pub use tracing_subscriber::{fmt, EnvFilter};
|
Loading…
x
Reference in New Issue
Block a user