|
@ -21,8 +21,6 @@ |
|
|
#include <stdbool.h> |
|
|
#include <stdbool.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool g_SYSLOG_ENABLED = false; |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
void |
|
|
syslog_open() |
|
|
syslog_open() |
|
|
{ |
|
|
{ |
|
@ -31,14 +29,12 @@ syslog_open() |
|
|
const int facility = LOG_USER; |
|
|
const int facility = LOG_USER; |
|
|
|
|
|
|
|
|
openlog(ident,option,facility); |
|
|
openlog(ident,option,facility); |
|
|
g_SYSLOG_ENABLED = true; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void |
|
|
void |
|
|
syslog_close() |
|
|
syslog_close() |
|
|
{ |
|
|
{ |
|
|
closelog(); |
|
|
closelog(); |
|
|
g_SYSLOG_ENABLED = false; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static |
|
|
static |
|
@ -47,9 +43,6 @@ syslog_vlog(const int priority_, |
|
|
const char *format_, |
|
|
const char *format_, |
|
|
va_list valist_) |
|
|
va_list valist_) |
|
|
{ |
|
|
{ |
|
|
if(g_SYSLOG_ENABLED == false) |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
vsyslog(priority_,format_,valist_); |
|
|
vsyslog(priority_,format_,valist_); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|