Merge pull request #33 from Darksecond/docker-logging-fix

Fix logging in docker.
This commit is contained in:
Antoine Gersant 2019-05-28 18:12:41 -07:00 committed by GitHub
commit 3d704908aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,13 +125,15 @@ fn daemonize(options: &getopts::Matches) -> Result<()> {
fn init_log(log_level: LevelFilter, options: &getopts::Matches) -> Result<()> { fn init_log(log_level: LevelFilter, options: &getopts::Matches) -> Result<()> {
if options.opt_present("f") { if options.opt_present("f") {
if let Err(e) = TermLogger::init(log_level, LOG_CONFIG) { if let Err(e) = TermLogger::init(log_level, LOG_CONFIG) {
bail!("Error starting terminal logger: {}", e); println!("Error starting terminal logger: {}", e);
};
} else { } else {
return Ok(());
}
}
if let Err(e) = SimpleLogger::init(log_level, LOG_CONFIG) { if let Err(e) = SimpleLogger::init(log_level, LOG_CONFIG) {
bail!("Error starting simple logger: {}", e); bail!("Error starting simple logger: {}", e);
} }
}
Ok(()) Ok(())
} }