mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:55:09 +00:00
UI: Logger: Improve log file title
This commit is contained in:
parent
6c4ce1f372
commit
ca4aab5733
@ -106,6 +106,12 @@ void Logger::setPath(const QString &path)
|
|||||||
m_dir.setPath(path);
|
m_dir.setPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Logger::getFileTitle() const
|
||||||
|
{
|
||||||
|
return QLatin1String(APP_NAME) + " v" + APP_VERSION_STR
|
||||||
|
+ (isService() ? " Service" : QString());
|
||||||
|
}
|
||||||
|
|
||||||
Logger *Logger::instance()
|
Logger *Logger::instance()
|
||||||
{
|
{
|
||||||
static Logger *g_instanceLogger = nullptr;
|
static Logger *g_instanceLogger = nullptr;
|
||||||
@ -196,7 +202,7 @@ void Logger::writeLog(const QString &dateString, const QString &logLine)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write file header
|
// Write file header
|
||||||
writeLogLine(makeLogLine(Info, dateString, APP_NAME " v" APP_VERSION_STR));
|
writeLogLine(makeLogLine(Info, dateString, getFileTitle()));
|
||||||
}
|
}
|
||||||
|
|
||||||
writeLogLine(logLine);
|
writeLogLine(logLine);
|
||||||
|
@ -26,6 +26,8 @@ public:
|
|||||||
|
|
||||||
void setPath(const QString &path);
|
void setPath(const QString &path);
|
||||||
|
|
||||||
|
QString getFileTitle() const;
|
||||||
|
|
||||||
static Logger *instance();
|
static Logger *instance();
|
||||||
|
|
||||||
static QString getDateString();
|
static QString getDateString();
|
||||||
|
Loading…
Reference in New Issue
Block a user