From 066ef038ed8d7f0f687dcb46be2c7cb1bcbfecec Mon Sep 17 00:00:00 2001 From: Jun Zhang Date: Mon, 19 Oct 2015 11:47:14 +0800 Subject: [PATCH] init_log_streams: check if log_filename is empty. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 53f8a1fb7..d5fcae2f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);