From 9418fbde87e4c276e9a0d24ffc92244926580532 Mon Sep 17 00:00:00 2001 From: lado Date: Sun, 13 Nov 2011 02:00:43 +0100 Subject: better logging --- vdr-vdrmanager/sock.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vdr-vdrmanager/sock.cpp b/vdr-vdrmanager/sock.cpp index a5a029d..0bda8da 100644 --- a/vdr-vdrmanager/sock.cpp +++ b/vdr-vdrmanager/sock.cpp @@ -126,7 +126,7 @@ cVdrmanagerClientSocket * cVdrmanagerServerSocket::Accept() { newsocket = NULL; } dsyslog( - "[vdrmon] connect from %s, port %hd - %s", inet_ntoa(clientname.sin_addr), ntohs(clientname.sin_port), accepted ? "accepted" : "DENIED"); + "[vdrmanager] connect from %s, port %hd - %s", inet_ntoa(clientname.sin_addr), ntohs(clientname.sin_port), accepted ? "accepted" : "DENIED"); } } else if (errno != EINTR && errno != EAGAIN ) @@ -218,7 +218,12 @@ void cVdrmanagerClientSocket::Disconnect() { bool cVdrmanagerClientSocket::PutLine(string line) { //TODO http://projects.vdr-developer.org/issues/790 string line2 = cHelpers::compress_string(line); - isyslog("PutLine, line size is %s, with zlib it would be %s", line.size(), line2.size()); + unsigned long l = line.size(); + unsigned long l2 = line2.size(); + if(l2 == 0){ + l2 = 1; + } + isyslog("[vdrmanager] PutLine, line size is %lu, with zlib it would be %lu (factor %lu)", l, l2, l/l2); // add line to write buffer writebuf += line; -- cgit v1.2.3