Browse Source

syslog with daemon facility instead of kern (0)

pull/1610/head
Yousong Zhou 7 years ago
committed by Max Lv
parent
commit
7c5416b441
1 changed files with 8 additions and 8 deletions
  1. 16
      src/utils.h

16
src/utils.h

@ -99,14 +99,14 @@ extern int use_syslog;
use_tty = isatty(STDERR_FILENO); \ use_tty = isatty(STDERR_FILENO); \
} while (0) } while (0)
#define USE_SYSLOG(_ident, _cond) \
do { \
if (!use_syslog && (_cond)) { \
use_syslog = 1; \
} \
if (use_syslog) { \
openlog((_ident), LOG_CONS | LOG_PID, 0); \
} \
#define USE_SYSLOG(_ident, _cond) \
do { \
if (!use_syslog && (_cond)) { \
use_syslog = 1; \
} \
if (use_syslog) { \
openlog((_ident), LOG_CONS | LOG_PID, LOG_DAEMON); \
} \
} while (0) } while (0)
#define LOGI(format, ...) \ #define LOGI(format, ...) \

Loading…
Cancel
Save