home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xntp3.zip / gizmo / gizmo_syslog.h < prev    next >
Text File  |  1989-09-17  |  2KB  |  66 lines

  1. /*
  2.  * Copyright (c) 1982, 1986 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)syslog.h    7.1 (Berkeley) 6/4/86
  7.  */
  8.  
  9. /*
  10.  *  Facility codes
  11.  */
  12.  
  13. #define LOG_KERN    (0<<3)    /* kernel messages */
  14. #define LOG_USER    (1<<3)    /* random user-level messages */
  15. #define LOG_MAIL    (2<<3)    /* mail system */
  16. #define LOG_DAEMON    (3<<3)    /* system daemons */
  17. #define LOG_AUTH    (4<<3)    /* security/authorization messages */
  18. #define LOG_SYSLOG    (5<<3)    /* messages generated internally by syslogd */
  19. #define LOG_LPR        (6<<3)    /* line printer subsystem */
  20. #define LOG_RFS    (7<<3)    /* Remote File System server/client subsystem */
  21.     /* other codes through 15 reserved for system use */
  22. #define LOG_LOCAL0    (16<<3)    /* reserved for local use */
  23. #define LOG_LOCAL1    (17<<3)    /* reserved for local use */
  24. #define LOG_LOCAL2    (18<<3)    /* reserved for local use */
  25. #define LOG_LOCAL3    (19<<3)    /* reserved for local use */
  26. #define LOG_LOCAL4    (20<<3)    /* reserved for local use */
  27. #define LOG_LOCAL5    (21<<3)    /* reserved for local use */
  28. #define LOG_LOCAL6    (22<<3)    /* reserved for local use */
  29. #define LOG_LOCAL7    (23<<3)    /* reserved for local use */
  30.  
  31. #define LOG_NFACILITIES    24    /* maximum number of facilities */
  32. #define LOG_FACMASK    0x03f8    /* mask to extract facility part */
  33.  
  34. /*
  35.  *  Priorities (these are ordered)
  36.  */
  37.  
  38. #define LOG_EMERG    0    /* system is unusable */
  39. #define LOG_ALERT    1    /* action must be taken immediately */
  40. #define LOG_CRIT    2    /* critical conditions */
  41. #define LOG_ERR        3    /* error conditions */
  42. #define LOG_WARNING    4    /* warning conditions */
  43. #define LOG_NOTICE    5    /* normal but signification condition */
  44. #define LOG_INFO    6    /* informational */
  45. #define LOG_DEBUG    7    /* debug-level messages */
  46.  
  47. #define LOG_PRIMASK    0x0007    /* mask to extract priority part (internal) */
  48.  
  49. /*
  50.  * arguments to setlogmask.
  51.  */
  52. #define    LOG_MASK(pri)    (1 << (pri))        /* mask for one priority */
  53. #define    LOG_UPTO(pri)    ((1 << ((pri)+1)) - 1)    /* all priorities through pri */
  54.  
  55. /*
  56.  *  Option flags for openlog.
  57.  *
  58.  *    LOG_ODELAY no longer does anything; LOG_NDELAY is the
  59.  *    inverse of what it used to be.
  60.  */
  61. #define    LOG_PID        0x01    /* log the pid with each message */
  62. #define    LOG_CONS    0x02    /* log on the console if errors in sending */
  63. #define    LOG_ODELAY    0x04    /* delay open until syslog() is called */
  64. #define LOG_NDELAY    0x08    /* don't delay open */
  65. #define LOG_NOWAIT    0x10    /* if forking to log on console, don't wait() */
  66.