-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Suppressing redundant logging #1592
Comments
None of the log output is redundant, though it may be more information than you'd like.
But it does! You are, however, reenabling it when you install your own logger, redirecting Rocket's log output to yours. At that point, it's your responsibility to filter out log messages you don't want to see in whichever way you deem. Everything is working as expected here. See also #21 and #1410 for impending logging improvements. |
With fern fern::Dispatch::new()
.filter(|metadata| !metadata.target().starts_with("rocket")) |
Hi, we're using log4rs, and have installed a filter to prevent certain lines going to the log - which works well for most things (e.g. certain lines rusoto emits that we don't want logged), but not records with a target of "rocket::server" (as they appear in the log). The filter receives these with a target of "", I think this is due to the indentation system of rocket's log.rs. If I filter out records with a target of "", they do get filtered out... but then so do other lines. I found I had to filter out records using the module_path, not the target.
(Using rocket v0.5.0-rc.1) |
Rocket is mostly amazing but there's a lot of redundant logging coming out which can't be suppressed. Documentation suggests that setting config.log_level(LoggingLevel::Off) should disable internal logging but it doesn't. Here's an example :-
Note all of the output when all I want is the vo_server output. Here's my initialisation :-
The text was updated successfully, but these errors were encountered: