X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=555ec1559763f56ee2ee0d0f70ce964bc683db58;hp=e72166d20545e536861a9c1f50b42da58e122620;hb=693fafa0e9fd606bddbd3f3054d4f8c173b33291;hpb=50680e8d8548a9b856faa7c5d3d5d4ae4a6be2bd 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()));