should print error message to console but did not .
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:
- file
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
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.
closing for inactivity