mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #450 Changed path for log files in accordance with our new directory structure.
This commit is contained in:
@@ -84,7 +84,8 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
// File logger
|
// File logger
|
||||||
CFileLogger *fileLogger = new CFileLogger(applicationName, QString(), &a);
|
static const QString logPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/org.swift-project/logs";
|
||||||
|
CFileLogger *fileLogger = new CFileLogger(applicationName, logPath, &a);
|
||||||
fileLogger->changeLogPattern(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
fileLogger->changeLogPattern(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
||||||
|
|
||||||
// GUI icon
|
// GUI icon
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace BlackMisc
|
|||||||
m_applicationName(applicationName),
|
m_applicationName(applicationName),
|
||||||
m_logPath(logPath)
|
m_logPath(logPath)
|
||||||
{
|
{
|
||||||
|
if (!m_logPath.isEmpty()) { QDir::root().mkpath(m_logPath); }
|
||||||
removeOldLogFiles();
|
removeOldLogFiles();
|
||||||
if (!m_logPath.isEmpty() && !m_logPath.endsWith('/')) { m_logPath += '/'; }
|
if (!m_logPath.isEmpty() && !m_logPath.endsWith('/')) { m_logPath += '/'; }
|
||||||
m_logFile.setFileName(getFullFileName());
|
m_logFile.setFileName(getFullFileName());
|
||||||
|
|||||||
Reference in New Issue
Block a user