From 13992ceed52ee79ec1a616e42e509c0568d89080 Mon Sep 17 00:00:00 2001 From: Evgeniy Kozhuhovskiy Date: Wed, 12 Jan 2005 10:33:14 +0000 Subject: [PATCH] fixed working syslog --- source/bforce/logger.c | 2 -- source/include/logger.h | 27 +++++++++++---------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/source/bforce/logger.c b/source/bforce/logger.c index b1c5b4d..13d5071 100644 --- a/source/bforce/logger.c +++ b/source/bforce/logger.c @@ -348,8 +348,6 @@ int log(const char *s, ...) syslog(LP_A, "%s %s[%d] ", timestr, log_ident, mypid); else if( log_ttyname[0] ) syslog(LP_O, "%s %s[%d] ", timestr, log_ttyname, mypid); - else - fprintf(log_priority, "%s [%d] ", timestr, mypid); va_end(args); diff --git a/source/include/logger.h b/source/include/logger.h index cec5801..5d4b3e9 100644 --- a/source/include/logger.h +++ b/source/include/logger.h @@ -16,26 +16,21 @@ #include "confread.h" -/* enable this to use syslog facility */ - -/* #define USE_SYSLOG */ - - - enum { LOG_MODE_FILE, LOG_MODE_SYSLOG, LOG_MODE_MIXED }; enum { LOG_FILE_DAEMON, LOG_FILE_SESSION, LOG_FILE_DEBUG, LOG_FILE_HISTORY }; -enum { - LOG_EMERG = 0, /* system is unusable */ - LOG_ALERT = 1, /* action must be taken immediately */ - LOG_CRIT = 2, /* critical conditions */ - LOG_ERR = 3, /* error conditions */ - LOG_WARNING = 4, /* warning conditions */ - LOG_NOTICE = 5, /* normal but significant condition */ - LOG_INFO = 6, /* informational */ - LOG_DEBUG = 7 /* debug-level messages */ -}; +// enum { +// LOG_EMERG = 0, /* system is unusable */ +// LOG_ALERT = 1, /* action must be taken immediately */ +// LOG_CRIT = 2, /* critical conditions */ +// LOG_ERR = 3, /* error conditions */ +// LOG_WARNING = 4, /* warning conditions */ +// LOG_NOTICE = 5, /* normal but significant condition */ +// LOG_INFO = 6, /* informational */ +// LOG_DEBUG = 7 /* debug-level messages */ +//}; + #ifdef DEBUG # define D_CONFIG 0x0000001L