init_log_streams: check if log_filename is empty.
authorJun Zhang <zhangjunsin@gmail.com>
Mon, 19 Oct 2015 03:47:14 +0000 (11:47 +0800)
committerest31 <MTest31@outlook.com>
Mon, 19 Oct 2015 10:14:05 +0000 (12:14 +0200)
Fixes #3262.

src/main.cpp

index 53f8a1fb77f95b33b318db44ccc2cbf377204447..d5fcae2f79caeb7a55adc696289ae2768bc89b5f 100644 (file)
@@ -540,7 +540,7 @@ static void init_log_streams(const Settings &cmd_args)
                conf_loglev = lev_name[lev_i];
        }
 
-       if (conf_loglev.empty())  // No logging
+       if (log_filename.empty() || conf_loglev.empty())  // No logging
                return;
 
        LogLevel log_level = Logger::stringToLevel(conf_loglev);