1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +00:00

Fix garbage text appeared in log file

Fix up fed969ed64.
This commit is contained in:
Chocobo1 2022-06-17 23:54:38 +08:00
parent 3dd616f6ff
commit 61adfea196
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -134,19 +134,19 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
switch (msg.type) switch (msg.type)
{ {
case Log::INFO: case Log::INFO:
stream << u"(I) "; stream << QStringView(u"(I) ");
break; break;
case Log::WARNING: case Log::WARNING:
stream << u"(W) "; stream << QStringView(u"(W) ");
break; break;
case Log::CRITICAL: case Log::CRITICAL:
stream << u"(C) "; stream << QStringView(u"(C) ");
break; break;
default: default:
stream << u"(N) "; stream << QStringView(u"(N) ");
} }
stream << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << u" - " << msg.message << u'\n'; stream << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << QStringView(u" - ") << msg.message << QChar(u'\n');
if (m_backup && (m_logFile.size() >= m_maxSize)) if (m_backup && (m_logFile.size() >= m_maxSize))
{ {