feat: add setting to customize chat log timestamp (#6338)
This commit is contained in:
@@ -567,7 +567,10 @@ public:
|
||||
"/logging/separatelyStoreStreamLogs",
|
||||
false,
|
||||
};
|
||||
|
||||
QStringSetting logTimestampFormat = {
|
||||
"/logging/logTimestampFormat",
|
||||
"hh:mm:ss",
|
||||
};
|
||||
QStringSetting logPath = {"/logging/path", ""};
|
||||
|
||||
QStringSetting pathHighlightSound = {"/highlighting/highlightSoundPath",
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user