Skip to content

Commit 49d6735

Browse files
committed
Fix logger init (prevented logging to stderr for tests).
1 parent 11a98ac commit 49d6735

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/client.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ Log::Options GetLogOptions() {
141141
}
142142

143143
Log::Target GetLogTarget() {
144-
if (Config::Get()->always_log_to_syslog() ||
145-
Config::Get()->log_to_syslog_on_failure())
144+
if (Config::Get()->always_log_to_syslog())
146145
return Log::TARGET_SYSLOG;
147-
return Log::TARGET_NONE;
146+
if (!Config::Get()->log_to_syslog_on_failure())
147+
return Log::TARGET_NONE;
148+
return Log::TARGET_DEFAULT;
148149
}
149150

150151
} // namespace

0 commit comments

Comments
 (0)