diff --git a/src/server/LogManager.cpp b/src/server/LogManager.cpp index 39e1025..c62b544 100644 --- a/src/server/LogManager.cpp +++ b/src/server/LogManager.cpp @@ -14,15 +14,16 @@ void LogManager::log(QString file, QStringList msgs, QDateTime time){ qDebug() << "Log to File:" << file << msgs; if(file.isEmpty()){ return; } QFile LOG(file); - if( !LOG.open(QIODevice::WriteOnly, QIODevice::Append) ){ qDebug() << " - Could not write to log:" << file; return; } //error writing to file + //if(!LOG.exists()){ system( QString("touch "+file).toLocal8Bit() ); } + if( !LOG.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text) ){ qDebug() << " - Could not write to log:" << file; return; } //error writing to file QTextStream stream(&LOG); for(int i=0; i