Fixed log filename based on the executable name instead of the human-readable application name.

This commit is contained in:
Mathew Sutcliffe
2015-11-27 19:16:00 +00:00
parent 5264a364be
commit d35fc3f056

View File

@@ -80,7 +80,8 @@ namespace BlackGui
QApplication::setWindowIcon(icon);
// Logging
QString category("swift." + applicationName);
QString executableName = QFileInfo(QCoreApplication::applicationFilePath()).completeBaseName();
QString category("swift." + executableName);
// Translations
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
@@ -93,7 +94,7 @@ namespace BlackGui
// File logger
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));
// GUI icon