Make log more readable

This commit is contained in:
Atlante45 2015-10-05 14:59:28 -07:00
parent 3f684307e9
commit 598aab884e

View file

@ -120,11 +120,11 @@ QString LogHandler::printMessage(LogMsgType type, const QMessageLogContext& cont
}
// log prefix is in the following format
// [DEBUG] [TIMESTAMP] [PID] [TARGET] logged string
// [TIMESTAMP] [DEBUG] [PID] [TARGET] logged string
QString prefixString = QString("[%1]").arg(stringForLogType(type));
QString prefixString = QString("[%1]").arg(QDateTime::currentDateTime().toString(DATE_STRING_FORMAT));
prefixString.append(QString(" [%1]").arg(QDateTime::currentDateTime().toString(DATE_STRING_FORMAT)));
prefixString.append(QString(" [%1]").arg(stringForLogType(type)));
if (_shouldOutputPID) {
prefixString.append(QString(" [%1]").arg(QCoreApplication::instance()->applicationPid()));