From dc8ad3b59e41ffce53541411649b6838e905b8b5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 25 Aug 2009 18:25:16 +0200 Subject: 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 --- src/Daemon/CommLayerServerSocket.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/Daemon/CommLayerServerSocket.cpp') 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 #include #include #include #include -#include -#include -#include +#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(G_IO_IN |G_IO_PRI| G_IO_ERR | G_IO_HUP | G_IO_NVAL), -- cgit