We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好! 在我的应用中使用了fast_log 1.6.16作为日志输出,用法非常接近以前在java中习惯用的log4j,体验很棒,但最近有两个小问题反馈一下。
fast_log 1.6.16
java
log4j
ModuleFilter
tracing
linux
windows
LevelFilter
let filter = ModuleFilter::new(); filter.modules.push("tracing::span".to_string()); fast_log::init(fast_log::Config::new() .console() .chan_len(Some(100000)) .level(LevelFilter::Debug) .add_filter(filter) .file_split(&log_path, LogSize::MB(5), RollingType::All, LogPacker {}) ).unwrap();
在linux下运行时仍然会输出日志信息:
2024-04-17 17:50:08.078557605 [INFO] socket reader;
simple_logger
fast_log
The text was updated successfully, but these errors were encountered:
No branches or pull requests
你好!
在我的应用中使用了
fast_log 1.6.16
作为日志输出,用法非常接近以前在java
中习惯用的log4j
,体验很棒,但最近有两个小问题反馈一下。ModuleFilter
过滤tracing
包的日志,在linux
环境下的表现与windows
不同。在windows
下,被过滤了就不会输出任何级别的日志,而在linux
下似乎没起作用。在linux
下,被过滤时还会受LevelFilter
的影响,只要低于设定级别就会输出日志。下面是配置代码:
在
linux
下运行时仍然会输出日志信息:2024-04-17 17:50:08.078557605 [INFO] socket reader;
ModuleFilter
过滤很好,但是应用依赖了很多层,层,层的第三方的包,运行时突然蹦出来的日志信息都不知道是哪里来的,找起来一点头绪都没有,很是头大。我只好在调试时换个日志框架simple_logger
先找出捣乱的包名,记下来,再切换回fast_log
加入过滤器。有没有更直接的方法,可以直接看到是哪个包输出了日志?The text was updated successfully, but these errors were encountered: