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.

73 lines
1.9 KiB

28 years ago
  1. /*
  2. * This header borrowed from Cygnus GNUwin32 project
  3. *
  4. * Modified for use with functions to map syslog
  5. * calls to EventLog calls on the windows platform
  6. *
  7. * much of this is not used, but here for the sake of
  8. * error free compilation. EventLogs will most likely
  9. * not behave as syslog does, but may be useful anyway.
  10. * much of what syslog does can be emulated here, but
  11. * that will have to be done later.
  12. */
  13. #ifndef _SYS_LOG_H
  14. #define _SYS_LOG_H
  15. #define WIN32_LEAN_AND_MEAN
  16. #include <windows.h>
  17. #define LOG_EMERG 1
  18. #define LOG_ALERT 1
  19. #define LOG_CRIT 1
  20. #define LOG_ERR 4
  21. #define LOG_WARNING 5
  22. #define LOG_NOTICE 6
  23. #define LOG_INFO 6
  24. #define LOG_DEBUG 6
  25. #define LOG_PRIMASK 0x07
  26. #define LOG_PRI(p) ((p) & LOG_PRIMASK)
  27. #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
  28. #define LOG_KERN (0<<3)
  29. #define LOG_USER (1<<3)
  30. #define LOG_MAIL (2<<3)
  31. #define LOG_DAEMON (3<<3)
  32. #define LOG_AUTH (4<<3)
  33. #define LOG_SYSLOG (5<<3)
  34. #define LOG_LPR (6<<3)
  35. #define LOG_NEWS (7<<3)
  36. #define LOG_UUCP (8<<3)
  37. #define LOG_CRON (9<<3)
  38. #define LOG_AUTHPRIV (10<<3)
  39. #define LOG_NFACILITIES 10
  40. #define LOG_FACMASK 0x03f8
  41. #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
  42. #define LOG_MASK(pri) (1 << (pri))
  43. #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
  44. /*
  45. * Option flags for openlog.
  46. *
  47. * LOG_ODELAY no longer does anything.
  48. * LOG_NDELAY is the inverse of what it used to be.
  49. */
  50. #define LOG_PID 0x01 /* log the pid with each message */
  51. #define LOG_CONS 0x02 /* log on the console if errors in sending */
  52. #define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
  53. #define LOG_NDELAY 0x08 /* don't delay open */
  54. #define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
  55. #define LOG_PERROR 0x20 /* log to stderr as well */
  56. extern void closelog(void);
  57. extern void openlog(const char *, int, int);
  58. // setlogmask not implemented
  59. //extern int setlogmask (int);
  60. extern void syslog(int, const char *,...);
  61. #endif /* _SYS_LOG_H */