summaryrefslogtreecommitdiff
path: root/lib/server/ServerStream.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-07-31 23:18:05 +0000
committerChris Wilson <chris+github@qwirx.com>2007-07-31 23:18:05 +0000
commit0b2fd98dd63c533e00c0d61ce022f37ee75857cc (patch)
tree5daa2a50b28b572e01281b622fee3adf818f5075 /lib/server/ServerStream.h
parent05db569d4efc62eaa10597142b8eac4937421e14 (diff)
Replace almost all calls to syslog() with logging framework. (refs #3)
Diffstat (limited to 'lib/server/ServerStream.h')
-rw-r--r--lib/server/ServerStream.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h
index 7eb99d13..5f615336 100644
--- a/lib/server/ServerStream.h
+++ b/lib/server/ServerStream.h
@@ -14,7 +14,6 @@
#include <errno.h>
#ifndef WIN32
- #include <syslog.h>
#include <sys/wait.h>
#endif
@@ -73,7 +72,10 @@ public:
{
if(childExit)
{
- ::syslog(LOG_ERR, "in server child, exception %s (%d/%d) -- terminating child", e.what(), e.GetType(), e.GetSubType());
+ BOX_ERROR("Error in child process, "
+ "terminating connection: exception " <<
+ e.what() << "(" << e.GetType() <<
+ "/" << e.GetSubType() << ")");
_exit(1);
}
else throw;
@@ -82,7 +84,9 @@ public:
{
if(childExit)
{
- ::syslog(LOG_ERR, "in server child, exception %s -- terminating child", e.what());
+ BOX_ERROR("Error in child process, "
+ "terminating connection: exception " <<
+ e.what());
_exit(1);
}
else throw;
@@ -91,7 +95,9 @@ public:
{
if(childExit)
{
- ::syslog(LOG_ERR, "in server child, unknown exception -- terminating child");
+ BOX_ERROR("Error in child process, "
+ "terminating connection: "
+ "unknown exception");
_exit(1);
}
else throw;
@@ -266,7 +272,7 @@ public:
}
// Log it
- ::syslog(LOG_INFO, "%s (handling in child %d)", logMessage.c_str(), pid);
+ BOX_WARNING("Error message from child process " << pid << ": " << logMessage);
}
else
{