Refactor logfile name to be variable
This commit is contained in:
+3
-3
@@ -256,8 +256,8 @@ void setUpLogging()
|
|||||||
conf.set( Level::Global,
|
conf.set( Level::Global,
|
||||||
ConfigurationType::Format,
|
ConfigurationType::Format,
|
||||||
"[%level] %datetime{%Y-%M-%d %H:%m:%s}: %msg" );
|
"[%level] %datetime{%Y-%M-%d %H:%m:%s}: %msg" );
|
||||||
conf.set(
|
constexpr auto logFileName = "AdvancedSettings.log";
|
||||||
Level::Global, ConfigurationType::Filename, "AdvancedSettings.log" );
|
conf.set( Level::Global, ConfigurationType::Filename, logFileName );
|
||||||
|
|
||||||
constexpr auto confEnabled = "true";
|
constexpr auto confEnabled = "true";
|
||||||
conf.set( Level::Global, ConfigurationType::Enabled, confEnabled );
|
conf.set( Level::Global, ConfigurationType::Enabled, confEnabled );
|
||||||
@@ -278,7 +278,7 @@ void setUpLogging()
|
|||||||
const auto logFilePath = QDir( QStandardPaths::writableLocation(
|
const auto logFilePath = QDir( QStandardPaths::writableLocation(
|
||||||
QStandardPaths::AppDataLocation )
|
QStandardPaths::AppDataLocation )
|
||||||
+ appDataLocation.c_str() )
|
+ appDataLocation.c_str() )
|
||||||
.absoluteFilePath( "AdvancedSettings.log" );
|
.absoluteFilePath( logFileName );
|
||||||
conf.set( el::Level::Global,
|
conf.set( el::Level::Global,
|
||||||
el::ConfigurationType::Filename,
|
el::ConfigurationType::Filename,
|
||||||
QDir::toNativeSeparators( logFilePath ).toStdString() );
|
QDir::toNativeSeparators( logFilePath ).toStdString() );
|
||||||
|
|||||||
Reference in New Issue
Block a user