syslog.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Sterling Hughes <sterling@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef SYSLOG_H
  19. #define SYSLOG_H
  20. #define WIN32_LEAN_AND_MEAN
  21. #include <windows.h>
  22. #define LOG_EMERG 1
  23. #define LOG_ALERT 1
  24. #define LOG_CRIT 1
  25. #define LOG_ERR 4
  26. #define LOG_WARNING 5
  27. #define LOG_NOTICE 6
  28. #define LOG_INFO 6
  29. #define LOG_DEBUG 6
  30. #define LOG_PRIMASK 0x07
  31. #define LOG_PRI(p) ((p) & LOG_PRIMASK)
  32. #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
  33. #define LOG_KERN (0<<3)
  34. #define LOG_USER (1<<3)
  35. #define LOG_MAIL (2<<3)
  36. #define LOG_DAEMON (3<<3)
  37. #define LOG_AUTH (4<<3)
  38. #define LOG_SYSLOG (5<<3)
  39. #define LOG_LPR (6<<3)
  40. #define LOG_NEWS (7<<3)
  41. #define LOG_UUCP (8<<3)
  42. #define LOG_CRON (9<<3)
  43. #define LOG_AUTHPRIV (10<<3)
  44. #define LOG_NFACILITIES 10
  45. #define LOG_FACMASK 0x03f8
  46. #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
  47. #define LOG_MASK(pri) (1 << (pri))
  48. #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
  49. /*
  50. * Option flags for openlog.
  51. *
  52. * LOG_ODELAY no longer does anything.
  53. * LOG_NDELAY is the inverse of what it used to be.
  54. */
  55. #define LOG_PID 0x01 /* log the pid with each message */
  56. #define LOG_CONS 0x02 /* log on the console if errors in sending */
  57. #define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
  58. #define LOG_NDELAY 0x08 /* don't delay open */
  59. #define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
  60. #define LOG_PERROR 0x20 /* log to stderr as well */
  61. extern void closelog(void);
  62. extern void openlog(const char *, int, int);
  63. extern void syslog(int, const char *, ...);
  64. extern void vsyslog(int, const char *, va_list ap);
  65. #endif /* SYSLOG_H */
  66. /*
  67. * Local variables:
  68. * tab-width: 4
  69. * c-basic-offset: 4
  70. * End:
  71. * vim600: sw=4 ts=4 fdm=marker
  72. * vim<600: sw=4 ts=4
  73. */