log4rs icon indicating copy to clipboard operation
log4rs copied to clipboard

should print error message to console but did not .

Open nich0las opened this issue 1 year ago • 1 comments

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

nich0las avatar Aug 28 '24 02:08 nich0las

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.

gauntl3t12 avatar Sep 08 '24 20:09 gauntl3t12

closing for inactivity

estk avatar May 26 '25 07:05 estk