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

  1. From afe796ce6e7a4164459009c58d7e60862edb0be3 Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Tue, 1 Aug 2017 15:21:38 +0800
  4. Subject: [PATCH 2/2] syslog with daemon facility instead of kern (0)
  5. ---
  6. src/utils.h | 16 ++++++++--------
  7. 1 file changed, 8 insertions(+), 8 deletions(-)
  8. diff --git a/src/utils.h b/src/utils.h
  9. index 53f3983..3b624e8 100644
  10. --- a/src/utils.h
  11. +++ b/src/utils.h
  12. @@ -99,14 +99,14 @@ extern int use_syslog;
  13. use_tty = isatty(STDERR_FILENO); \
  14. } while (0)
  15. -#define USE_SYSLOG(_ident, _cond) \
  16. - do { \
  17. - if (!use_syslog && (_cond)) { \
  18. - use_syslog = 1; \
  19. - } \
  20. - if (use_syslog) { \
  21. - openlog((_ident), LOG_CONS | LOG_PID, 0); \
  22. - } \
  23. +#define USE_SYSLOG(_ident, _cond) \
  24. + do { \
  25. + if (!use_syslog && (_cond)) { \
  26. + use_syslog = 1; \
  27. + } \
  28. + if (use_syslog) { \
  29. + openlog((_ident), LOG_CONS | LOG_PID, LOG_DAEMON); \
  30. + } \
  31. } while (0)
  32. #define LOGI(format, ...) \
  33. --
  34. 2.12.2