summaryrefslogtreecommitdiffstats
path: root/src/Daemon/CrashWatcher.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-08-25 18:25:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-08-25 18:25:16 +0200
commitdc8ad3b59e41ffce53541411649b6838e905b8b5 (patch)
treef3d4aa18dc4777f0028baf75e0ec44cdca366bac /src/Daemon/CrashWatcher.cpp
parent58e6c582c3103dac17f5575c6bd17ee7c0784f05 (diff)
downloadabrt-dc8ad3b59e41ffce53541411649b6838e905b8b5.tar.gz
abrt-dc8ad3b59e41ffce53541411649b6838e905b8b5.tar.xz
abrt-dc8ad3b59e41ffce53541411649b6838e905b8b5.zip
more sensible logging
comm_layer_inner_debug was jumping through the hoops in order to simply send a message to stderr. this can be made much simpler. also, set logmode to LOGMODE_SYSLOG in abrt daemon, making its log visible if it is daemonized. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CrashWatcher.cpp')
-rw-r--r--src/Daemon/CrashWatcher.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index f0593c1c..ffc71338 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -24,7 +24,7 @@
void CCrashWatcher::Status(const std::string& pMessage, const std::string& pDest)
{
- std::cout << "Update: " + pMessage << std::endl;
+ log("Update: %s", pMessage.c_str());
//FIXME: send updates only to job owner
if (g_pCommLayer != NULL)
g_pCommLayer->Update(pDest, pMessage);
@@ -32,15 +32,14 @@ void CCrashWatcher::Status(const std::string& pMessage, const std::string& pDest
void CCrashWatcher::Warning(const std::string& pMessage)
{
- std::cerr << "Warning: " + pMessage << std::endl;
+ log("Warning: %s", pMessage.c_str());
if (g_pCommLayer != NULL)
g_pCommLayer->Warning(pMessage);
}
void CCrashWatcher::Debug(const std::string& pMessage)
{
- //some logic to add logging levels?
- std::cout << "Debug: " + pMessage << std::endl;
+ log("Debug: %s", pMessage.c_str());
}
CCrashWatcher::CCrashWatcher()
@@ -55,7 +54,7 @@ CCrashWatcher::~CCrashWatcher()
vector_crash_infos_t CCrashWatcher::GetCrashInfos(const std::string &pUID)
{
vector_crash_infos_t retval;
- Debug("Getting crash infos...");
+ log("Getting crash infos...");
try
{
vector_pair_string_string_t UUIDsUIDs;
@@ -117,7 +116,7 @@ static void *create_report(void *arg)
{
thread_data_t *thread_data = (thread_data_t *) arg;
map_crash_info_t crashReport;
- g_cw->Debug("Creating report...");
+ log("Creating report...");
try
{
mw_result_t res;