diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/base/log.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 9ae62368..26f14207 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -517,6 +517,8 @@ void Logger::logSetLevel(const char *category, const char *level) */ Logger::Logger() { + logSetStream(&std::cerr); + parseLogFile(); parseLogLevels(); } @@ -533,10 +535,8 @@ Logger::Logger() void Logger::parseLogFile() { const char *file = utils::secure_getenv("LIBCAMERA_LOG_FILE"); - if (!file) { - logSetStream(&std::cerr); + if (!file) return; - } if (!strcmp(file, "syslog")) { logSetTarget(LoggingTargetSyslog); |