summaryrefslogtreecommitdiffstats
path: root/src/Daemon/CommLayerServerSocket.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/CommLayerServerSocket.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/CommLayerServerSocket.cpp')
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index 734c5a18..1b540686 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -1,15 +1,12 @@
-#include "CommLayerServerSocket.h"
-#include "CommLayerInner.h"
-#include "ABRTException.h"
-#include "CrashTypesSocket.h"
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <iostream>
#include <sstream>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
+#include "abrtlib.h"
+#include "CommLayerInner.h"
+#include "ABRTException.h"
+#include "CrashTypesSocket.h"
+#include "CommLayerServerSocket.h"
void CCommLayerServerSocket::Send(const std::string& pData, GIOChannel *pDestination)
{
@@ -66,7 +63,7 @@ gboolean CCommLayerServerSocket::client_socket_cb(GIOChannel *source, GIOConditi
condition & G_IO_ERR ||
condition & G_IO_NVAL)
{
- comm_layer_inner_debug("Socket client disconnected.");
+ log("Socket client disconnected");
g_io_channel_unref(serverSocket->m_mapClientChannels[g_io_channel_unix_get_fd(source)]);
serverSocket->m_mapClientChannels.erase(g_io_channel_unix_get_fd(source));
return FALSE;
@@ -116,7 +113,7 @@ gboolean CCommLayerServerSocket::server_socket_cb(GIOChannel *source, GIOConditi
comm_layer_inner_warning("Server can not accept client.");
return TRUE;
}
- comm_layer_inner_debug("New socket client connected.");
+ log("New socket client connected");
GIOChannel* gSocket = g_io_channel_unix_new(socket);
if (!g_io_add_watch(gSocket,
static_cast<GIOCondition>(G_IO_IN |G_IO_PRI| G_IO_ERR | G_IO_HUP | G_IO_NVAL),