From: Sebastian Goth Date: Wed, 30 Jul 2008 09:22:50 +0000 (+0200) Subject: Changed default logging to stdout and some minor fixes. X-Git-Tag: 0.3.0~191 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=693fafa0e9fd606bddbd3f3054d4f8c173b33291;p=quassel.git Changed default logging to stdout and some minor fixes. --- diff --git a/src/common/global.cpp b/src/common/global.cpp index 6a75e34f..13f242c7 100644 --- a/src/common/global.cpp +++ b/src/common/global.cpp @@ -22,7 +22,6 @@ #include #include "global.h" -#include "logger.h" #include "message.h" #include "identity.h" #include "network.h" diff --git a/src/common/main.cpp b/src/common/main.cpp index e72166d2..555ec155 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -85,7 +85,7 @@ int main(int argc, char **argv) { // put core-only arguments here Global::parser.addOption("port",'p',"The port quasselcore will listen at",QString("4242")); Global::parser.addSwitch("norestore", 'n', "Don't restore last core's state"); - Global::parser.addOption("logfile",'l',"Path to logfile","./quassel.log"); + Global::parser.addOption("logfile",'l',"Path to logfile"); Global::parser.addOption("loglevel",'L',"Loglevel Debug|Info|Warning|Error","Info"); #endif // BUILD_QTUI #ifndef BUILD_CORE @@ -112,9 +112,9 @@ int main(int argc, char **argv) { logFile.setFileName(Global::parser.value("logfile")); if(!logFile.open(QIODevice::Append | QIODevice::Text)) qWarning("Warning: Couldn't open logfile '%s' - will log to stdout instead",qPrintable(logFile.fileName())); - logFile.close(); + else logFile.close(); } - else qWarning("Warning: Couldn't open logfile '%s' - will log to stdout instead",qPrintable(logFile.fileName())); + else qWarning("No logfile set - will log to stdout instead"); } qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));