fixed working syslog
This commit is contained in:
parent
f56cd4b32e
commit
13992ceed5
@ -348,8 +348,6 @@ int log(const char *s, ...)
|
|||||||
syslog(LP_A, "%s %s[%d] ", timestr, log_ident, mypid);
|
syslog(LP_A, "%s %s[%d] ", timestr, log_ident, mypid);
|
||||||
else if( log_ttyname[0] )
|
else if( log_ttyname[0] )
|
||||||
syslog(LP_O, "%s %s[%d] ", timestr, log_ttyname, mypid);
|
syslog(LP_O, "%s %s[%d] ", timestr, log_ttyname, mypid);
|
||||||
else
|
|
||||||
fprintf(log_priority, "%s [%d] ", timestr, mypid);
|
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
|
@ -16,26 +16,21 @@
|
|||||||
|
|
||||||
#include "confread.h"
|
#include "confread.h"
|
||||||
|
|
||||||
/* enable this to use syslog facility */
|
|
||||||
|
|
||||||
/* #define USE_SYSLOG */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum { LOG_MODE_FILE, LOG_MODE_SYSLOG, LOG_MODE_MIXED };
|
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_FILE_DAEMON, LOG_FILE_SESSION, LOG_FILE_DEBUG, LOG_FILE_HISTORY };
|
||||||
|
|
||||||
enum {
|
// enum {
|
||||||
LOG_EMERG = 0, /* system is unusable */
|
// LOG_EMERG = 0, /* system is unusable */
|
||||||
LOG_ALERT = 1, /* action must be taken immediately */
|
// LOG_ALERT = 1, /* action must be taken immediately */
|
||||||
LOG_CRIT = 2, /* critical conditions */
|
// LOG_CRIT = 2, /* critical conditions */
|
||||||
LOG_ERR = 3, /* error conditions */
|
// LOG_ERR = 3, /* error conditions */
|
||||||
LOG_WARNING = 4, /* warning conditions */
|
// LOG_WARNING = 4, /* warning conditions */
|
||||||
LOG_NOTICE = 5, /* normal but significant condition */
|
// LOG_NOTICE = 5, /* normal but significant condition */
|
||||||
LOG_INFO = 6, /* informational */
|
// LOG_INFO = 6, /* informational */
|
||||||
LOG_DEBUG = 7 /* debug-level messages */
|
// LOG_DEBUG = 7 /* debug-level messages */
|
||||||
};
|
//};
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# define D_CONFIG 0x0000001L
|
# define D_CONFIG 0x0000001L
|
||||||
|
Loading…
x
Reference in New Issue
Block a user