From ea9904b0f42b70fc13f933fcb13ebbd1bfb7f7b0 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 8 Apr 2019 16:22:44 +0500 Subject: [PATCH] UI: Logger: Simplify output. --- src/ui/util/logger.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/util/logger.cpp b/src/ui/util/logger.cpp index 282b8a18..d56357cc 100644 --- a/src/ui/util/logger.cpp +++ b/src/ui/util/logger.cpp @@ -93,11 +93,10 @@ void Logger::closeLogFile() void Logger::writeLogLine(Logger::LogLevel level, const QString &dateString, const QString &message) { - static const char * const g_levelTexts[] = { - "[Info]", "[Warn]", "[Fail]"}; + static const char * const g_levelChars = "IWE"; const QString line = dateString - + ' ' + g_levelTexts[int(level)] + + ' ' + g_levelChars[int(level)] + ' ' + message + '\n'; m_file.write(line.toLatin1()); @@ -124,8 +123,7 @@ void Logger::writeLog(const QString &message, Logger::LogLevel level) } // Write file header - writeLogLine(Info, dateString, APP_NAME " version: " APP_VERSION_STR - " build date: " __DATE__ " " __TIME__); + writeLogLine(Info, dateString, APP_NAME " version: " APP_VERSION_STR); } writeLogLine(level, dateString, message);