summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Logger.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-12 16:58:07 +0100
committerKarel Klic <kklic@redhat.com>2009-11-12 16:58:07 +0100
commit32cee84a34c005fe0d2863f439007ec633687fa8 (patch)
tree149ca7014e4295de3788f28ae88e9d9d7003da46 /lib/Plugins/Logger.cpp
parent5a8a8a6c99c9067e0dfcce839c32826a2badff0b (diff)
parent3938e6e075867ae3a349ba307ee672aa458d2662 (diff)
downloadabrt-32cee84a34c005fe0d2863f439007ec633687fa8.tar.gz
abrt-32cee84a34c005fe0d2863f439007ec633687fa8.tar.xz
abrt-32cee84a34c005fe0d2863f439007ec633687fa8.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/Logger.cpp')
-rw-r--r--lib/Plugins/Logger.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index b2ac1ad..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,23 +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());
}
}
-const map_plugin_settings_t& CLogger::GetSettings()
-{
- m_pSettings["LogPath"] = m_sLogPath;
- m_pSettings["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
-
- return m_pSettings;
-}
+//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)