mirror of
https://github.com/agersant/polaris
synced 2024-11-30 00:50:16 +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
12
src/main.rs
12
src/main.rs
|
@ -125,13 +125,15 @@ fn daemonize(options: &getopts::Matches) -> Result<()> {
|
|||
fn init_log(log_level: LevelFilter, options: &getopts::Matches) -> Result<()> {
|
||||
if options.opt_present("f") {
|
||||
if let Err(e) = TermLogger::init(log_level, LOG_CONFIG) {
|
||||
bail!("Error starting terminal logger: {}", e);
|
||||
};
|
||||
} else {
|
||||
if let Err(e) = SimpleLogger::init(log_level, LOG_CONFIG) {
|
||||
bail!("Error starting simple logger: {}", e);
|
||||
println!("Error starting terminal logger: {}", e);
|
||||
} else {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
if let Err(e) = SimpleLogger::init(log_level, LOG_CONFIG) {
|
||||
bail!("Error starting simple logger: {}", e);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue