You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You only have the file appender listed under your root::appenders. If you need help with the configuration, please review the documentation and give it another go. We can lend a hand, and maybe improve the docs, if you're still having trouble after reviewing them.
log4rs.yml:
refresh_rate: 5 seconds
appenders:
console:
kind: console
encoder:
pattern: "{d(%+)(local)} [{t}] {h({l})} {M}:{m}{n}"
filters:
- kind: threshold
level: error
file:
kind: file
path: info.log
encoder:
pattern: "{d} [{t}] {l} {M}:{m}{n}"
root:
appenders:
loggers:
multi_logger_config:
level: error
appenders:
- console
additive: true
main.rs:
use log::{error, info};
fn main() {
log4rs::init_file("config/log4rs.yml", Default::default()).unwrap();
error!("error");
info!("hello");
println!("println");
}
expected: error message in console but i can't find error message
The text was updated successfully, but these errors were encountered: