Browse Source

Log debug messages to syslog

Andrea Luzzardi 18 years ago
parent
commit
7a86ac9cd4
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/log.c

+ 6
- 0
src/log.c View File

@ -58,6 +58,10 @@ void __log_debug(const char *file, int line, const char *fmt, ...)
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
va_start(ap, fmt);
pusb_log_syslog(LOG_DEBUG, fmt, ap);
va_end(ap);
}
void log_error(const char *fmt, ...)
@ -67,6 +71,7 @@ void log_error(const char *fmt, ...)
va_start(ap, fmt);
pusb_log_syslog(LOG_ERR, fmt, ap);
va_end(ap);
va_start(ap, fmt);
pusb_log_output(LOG_ERR, fmt, ap);
va_end(ap);
@ -79,6 +84,7 @@ void log_info(const char *fmt, ...)
va_start(ap, fmt);
pusb_log_syslog(LOG_NOTICE, fmt, ap);
va_end(ap);
va_start(ap, fmt);
pusb_log_output(LOG_NOTICE, fmt, ap);
va_end(ap);


Loading…
Cancel
Save