mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:25:18 +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);
|
||||
}
|
||||
|
||||
QString Logger::getFileTitle() const
|
||||
{
|
||||
return QLatin1String(APP_NAME) + " v" + APP_VERSION_STR
|
||||
+ (isService() ? " Service" : QString());
|
||||
}
|
||||
|
||||
Logger *Logger::instance()
|
||||
{
|
||||
static Logger *g_instanceLogger = nullptr;
|
||||
@ -196,7 +202,7 @@ void Logger::writeLog(const QString &dateString, const QString &logLine)
|
||||
}
|
||||
|
||||
// Write file header
|
||||
writeLogLine(makeLogLine(Info, dateString, APP_NAME " v" APP_VERSION_STR));
|
||||
writeLogLine(makeLogLine(Info, dateString, getFileTitle()));
|
||||
}
|
||||
|
||||
writeLogLine(logLine);
|
||||
|
@ -26,6 +26,8 @@ public:
|
||||
|
||||
void setPath(const QString &path);
|
||||
|
||||
QString getFileTitle() const;
|
||||
|
||||
static Logger *instance();
|
||||
|
||||
static QString getDateString();
|
||||
|
Loading…
Reference in New Issue
Block a user