From 783e8093bd49434d250d7c0271d2971f36b87820 Mon Sep 17 00:00:00 2001 From: Vasily Date: Mon, 11 Mar 2019 11:33:48 +0100 Subject: [PATCH] Refactor logfile name to be variable --- src/utils/setup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/setup.cpp b/src/utils/setup.cpp index 3eab7d2..8849c57 100644 --- a/src/utils/setup.cpp +++ b/src/utils/setup.cpp @@ -256,8 +256,8 @@ void setUpLogging() conf.set( Level::Global, ConfigurationType::Format, "[%level] %datetime{%Y-%M-%d %H:%m:%s}: %msg" ); - conf.set( - Level::Global, ConfigurationType::Filename, "AdvancedSettings.log" ); + constexpr auto logFileName = "AdvancedSettings.log"; + conf.set( Level::Global, ConfigurationType::Filename, logFileName ); constexpr auto confEnabled = "true"; conf.set( Level::Global, ConfigurationType::Enabled, confEnabled ); @@ -278,7 +278,7 @@ void setUpLogging() const auto logFilePath = QDir( QStandardPaths::writableLocation( QStandardPaths::AppDataLocation ) + appDataLocation.c_str() ) - .absoluteFilePath( "AdvancedSettings.log" ); + .absoluteFilePath( logFileName ); conf.set( el::Level::Global, el::ConfigurationType::Filename, QDir::toNativeSeparators( logFilePath ).toStdString() );