feat: add setting to customize chat log timestamp (#6338)

This commit is contained in:
droidicus
2025-07-19 06:30:31 -04:00
committed by GitHub
parent 4944ce326f
commit f20945edc7
5 changed files with 28 additions and 5 deletions
+4 -1
View File
@@ -567,7 +567,10 @@ public:
"/logging/separatelyStoreStreamLogs",
false,
};
QStringSetting logTimestampFormat = {
"/logging/logTimestampFormat",
"hh:mm:ss",
};
QStringSetting logPath = {"/logging/path", ""};
QStringSetting pathHighlightSound = {"/highlighting/highlightSoundPath",
+7 -3
View File
@@ -182,9 +182,13 @@ void LoggingChannel::addMessage(const MessagePtr &message,
str.append("#" + message->channelName + " ");
}
str.append('[');
str.append(now.toString("HH:mm:ss"));
str.append("] ");
QString logTimestampFormat = getSettings()->logTimestampFormat;
if (logTimestampFormat != "Disable")
{
str.append('[');
str.append(now.toString(logTimestampFormat));
str.append("] ");
}
QString messageText;
if (message->loginName.isEmpty())