You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.6 KiB

From afe796ce6e7a4164459009c58d7e60862edb0be3 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Tue, 1 Aug 2017 15:21:38 +0800
Subject: [PATCH 2/2] syslog with daemon facility instead of kern (0)
---
src/utils.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/utils.h b/src/utils.h
index 53f3983..3b624e8 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -99,14 +99,14 @@ extern int use_syslog;
use_tty = isatty(STDERR_FILENO); \
} 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)
#define LOGI(format, ...) \
--
2.12.2