mirror of
https://github.com/agersant/polaris
synced 2024-11-30 08:50:27 +00:00
Merge pull request #33 from Darksecond/docker-logging-fix
Fix logging in docker.
This commit is contained in:
commit
3d704908aa
1 changed files with 7 additions and 5 deletions
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue