Fix Windows builds

This commit is contained in:
Laurențiu Nicola 2019-08-07 08:23:47 +03:00
parent c4d7fc62b5
commit b1fec94e82
2 changed files with 2 additions and 1 deletions

View file

@ -108,7 +108,7 @@ fn init_log(log_level: LevelFilter, options: &getopts::Matches) -> Result<()> {
#[cfg(windows)]
fn init_log(log_level: LevelFilter, _: &getopts::Matches) -> Result<()> {
let config = log_config();
if TermLogger::init(log_level, LOG_CONFIG).is_err() {
if TermLogger::init(log_level, config, TerminalMode::Stdout).is_err() {
if let Err(e) = SimpleLogger::init(log_level, config) {
bail!("Error starting simple logger: {}", e);
}

View file

@ -1,3 +1,4 @@
use log::info;
use std;
use std::ffi::OsStr;
use std::os::windows::ffi::OsStrExt;