Merge pull request #8732 from huffman/feat/category-in-logs

Add category to log lines
This commit is contained in:
Clément Brisset 2016-10-05 13:29:42 -07:00 committed by GitHub
commit 476ccadb38

View file

@ -137,9 +137,8 @@ QString LogHandler::printMessage(LogMsgType type, const QMessageLogContext& cont
dateFormatPtr = &DATE_STRING_FORMAT_WITH_MILLISECONDS;
}
QString prefixString = QString("[%1]").arg(QDateTime::currentDateTime().toString(*dateFormatPtr));
prefixString.append(QString(" [%1]").arg(stringForLogType(type)));
QString prefixString = QString("[%1] [%2] [%3]").arg(QDateTime::currentDateTime().toString(*dateFormatPtr),
stringForLogType(type), context.category);
if (_shouldOutputProcessID) {
prefixString.append(QString(" [%1]").arg(QCoreApplication::instance()->applicationPid()));