mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +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
|
||||
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));
|
||||
|
||||
// GUI icon
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace BlackMisc
|
||||
m_applicationName(applicationName),
|
||||
m_logPath(logPath)
|
||||
{
|
||||
if (!m_logPath.isEmpty()) { QDir::root().mkpath(m_logPath); }
|
||||
removeOldLogFiles();
|
||||
if (!m_logPath.isEmpty() && !m_logPath.endsWith('/')) { m_logPath += '/'; }
|
||||
m_logFile.setFileName(getFullFileName());
|
||||
|
||||
Reference in New Issue
Block a user