$Log$
+ Revision 614.32 2004/02/16 18:13:10 error
+ * Log session IDs in syslog as well as stderr
+
Revision 614.31 2004/02/16 15:06:44 error
* Add specific error codes for every command on the wire protocol, so that
clients can more easily determine what went wrong. Partially updated
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
void lprintf(int loglevel, const char *format, ...) {
va_list arg_ptr;
char buf[SIZ];
-
+
va_start(arg_ptr, format);
vsnprintf(buf, sizeof(buf), format, arg_ptr);
va_end(arg_ptr);
if (syslog_facility >= 0) {
if (loglevel <= verbosity) {
+ /* Hackery -IO */
+ if (CC && CC->cs_pid) {
+ memmove(buf + 6, buf, sizeof(buf) - 6);
+ snprintf(buf, 6, "[%3d]", CC->cs_pid);
+ buf[5] = ' ';
+ }
syslog(LOG_NOTICE, buf);
}
}