Don't log to stdout if --syslog and/or --logfile are specified
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 29 Jan 2012 23:23:37 +0000 (00:23 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 29 Jan 2012 23:23:37 +0000 (00:23 +0100)
src/common/logger.cpp

index d9708f7..78a3610 100644 (file)
@@ -76,6 +76,9 @@ void Logger::log() {
     }
     syslog(LOG_USER & prio, "%s", qPrintable(_buffer));
   }
+  // don't log to stdout if --syslog was specified (but neither ignore --logfile)
+  if(!Quassel::logFile())
+    return;
 #endif
 
   _buffer.prepend(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss "));