Skip to content

Commit

Permalink
Logging: Include timestamp by default
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Aug 24, 2023
1 parent dfde28d commit aaadfd1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/util/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,14 @@ bool s_debugAssertBreak = false;
// QT_MESSAGE_PATTERN="%{type} [{{threadname}}] %{function} %{message}"
// TODO: Adjust the default format and messages and collect file and function info in release builds as well.

const QString kTimestampPattern = QStringLiteral("%{time h:mm:ss.zzz}");
const QString kThreadNamePattern = QStringLiteral("{{threadname}}");
const QString kDefaultMessagePattern = QStringLiteral("%{type} [") +
kThreadNamePattern + QStringLiteral("] %{message}");
const QString kDefaultMessagePattern = kTimestampPattern +
QStringLiteral(" %{type} [") + kThreadNamePattern +
QStringLiteral("] %{message}");

const QString kDefaultMessagePatternColor =
kTimestampPattern +
QStringLiteral(
"%{if-category}\033[35m %{category}:\033[35m%{endif}"
"%{if-debug}\033[34m%{type}%{endif}"
Expand Down

0 comments on commit aaadfd1

Please sign in to comment.