summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plugins/Logger.cpp')
-rw-r--r--lib/Plugins/Logger.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 32f45a35..e7579372 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -21,21 +21,25 @@
#include "Logger.h"
#include <fstream>
+#include "Settings.h"
CLogger::CLogger() :
m_sLogPath("/var/log/abrt-logger"),
m_bAppendLogs(true)
{}
-void CLogger::SetSettings(const map_settings_t& pSettings)
+void CLogger::LoadSettings(const std::string& pPath)
{
- if (pSettings.find("LogPath")!= pSettings.end())
+ map_settings_t settings;
+ load_settings(pPath, settings);
+
+ if (settings.find("LogPath")!= settings.end())
{
- m_sLogPath = pSettings.find("LogPath")->second;
+ m_sLogPath = settings["LogPath"];
}
- if (pSettings.find("AppendLogs")!= pSettings.end())
+ if (settings.find("AppendLogs")!= settings.end())
{
- m_bAppendLogs = pSettings.find("AppendLogs")->second == "yes";
+ m_bAppendLogs = settings["AppendLogs"] == "yes";
}
}