mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +08:00
Fixed log filename based on the executable name instead of the human-readable application name.
This commit is contained in:
@@ -80,7 +80,8 @@ namespace BlackGui
|
|||||||
QApplication::setWindowIcon(icon);
|
QApplication::setWindowIcon(icon);
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
QString category("swift." + applicationName);
|
QString executableName = QFileInfo(QCoreApplication::applicationFilePath()).completeBaseName();
|
||||||
|
QString category("swift." + executableName);
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
|
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
|
||||||
@@ -93,7 +94,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
// File logger
|
// File logger
|
||||||
static const QString logPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/org.swift-project/logs";
|
static const QString logPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/org.swift-project/logs";
|
||||||
CFileLogger *fileLogger = new CFileLogger(applicationName, logPath, &a);
|
CFileLogger *fileLogger = new CFileLogger(executableName, logPath, &a);
|
||||||
fileLogger->changeLogPattern(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityDebug));
|
fileLogger->changeLogPattern(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityDebug));
|
||||||
|
|
||||||
// GUI icon
|
// GUI icon
|
||||||
|
|||||||
Reference in New Issue
Block a user