#include "LogManager.h" #define TMPBREAK "" //Overall check/creation of the log directory void LogManager::checkLogDir(){ // - TO-DO } //Main Log write function (all the overloaded versions end up calling this one) void LogManager::log(QString file, QStringList msgs, QDateTime time){ if(file.isEmpty()){ return; } QFile LOG(file); if( !LOG.open(QIODevice::WriteOnly, QIODevice::Append) ){ return; } //error writing to file QTextStream str(&LOG); for(int i=0; i QDateTime::fromString( all.first().section("]",0,0).section("[",1,1), Qt::ISODate) ){ break; }else{ all.removeAt(all.length()-1); } } // - now double check that none of the temporary line break replacements get through for(int i=0; i0 ){ files.removeAt(files.length()-1); } else{ break; } } } //Now load each file in order (oldest->newest) and filter out the necessary logs QStringList logs; for(int i=0; i