summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Logger.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-11 22:30:27 +0100
committerKarel Klic <kklic@redhat.com>2009-11-11 22:30:27 +0100
commit07a12979cbf321c03c615f921aec601492e8d196 (patch)
treea0eba8c5b0cf06be829c378ca8704470e37a036b /lib/Plugins/Logger.cpp
parent4bb5f0163c1cf3c65745ea06f1b42545ecaa35d7 (diff)
parent640af192338643b3c9e6fbe0304726e951239c2b (diff)
downloadabrt-07a12979cbf321c03c615f921aec601492e8d196.tar.gz
abrt-07a12979cbf321c03c615f921aec601492e8d196.tar.xz
abrt-07a12979cbf321c03c615f921aec601492e8d196.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/Logger.cpp')
-rw-r--r--lib/Plugins/Logger.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 716d3a9..6babc73 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -19,9 +19,10 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "Logger.h"
#include <fstream>
#include <sstream>
+#include "abrtlib.h"
+#include "Logger.h"
#include "DebugDump.h"
#include "CommLayerInner.h"
#include "ABRTException.h"
@@ -33,25 +34,30 @@ CLogger::CLogger() :
void CLogger::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("LogPath") != pSettings.end())
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("LogPath");
+ if (it != end)
{
- m_sLogPath = pSettings.find("LogPath")->second;
+ m_sLogPath = it->second;
}
- if (pSettings.find("AppendLogs") != pSettings.end())
+ it = pSettings.find("AppendLogs");
+ if (it != end)
{
- m_bAppendLogs = pSettings.find("AppendLogs")->second == "yes";
+ m_bAppendLogs = string_to_bool(it->second.c_str());
}
}
-map_plugin_settings_t CLogger::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["LogPath"] = m_sLogPath;
- ret["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CLogger::GetSettings()
+//{
+// m_pSettings["LogPath"] = m_sLogPath;
+// m_pSettings["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
+//
+// return m_pSettings;
+//}
std::string CLogger::Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings, const std::string& pArgs)