View Javadoc

1   package ch.qos.logback.core.net;
2   
3   /**
4    * Constants used by syslog daemon and transitively by {@link SyslogAppenderBase}.
5    * 
6    * @author Ceki Gülcü
7    **/
8   public class SyslogConstants {
9     
10    static public final int SYSLOG_PORT = 514;
11    
12    
13    // Following constants extracted from RFC 3164, we multiply them by 8
14    // in order to precompute the facility part of PRI.
15    // See RFC 3164, Section 4.1.1 for exact details.
16  
17    /** Emergency: system is unusable */
18    public static final int EMERGENCY_SEVERITY = 0;       
19    /** Alert: action must be taken immediately */
20    public static final int ALERT_SEVERITY = 1;       
21    /**  Critical: critical conditions */
22    public static final int CRITICAL_SEVERITY = 2;  
23    /** Error: error conditions */
24    public static final int ERROR_SEVERITY = 3;  
25    /** Warning: warning conditions */
26    public static final int WARNING_SEVERITY = 4;  
27    /** Notice: normal but significant condition */
28    public static final int NOTICE_SEVERITY = 5;  
29    /**  Informational: informational messages */
30    public static final int INFO_SEVERITY = 6;  
31    /** Debug: debug-level messages */
32    public static final int DEBUG_SEVERITY = 7;  
33    
34    
35    /** kernel messages, numerical code 0. */
36    public static final int LOG_KERN = 0;
37    /** user-level messages, numerical code 1. */
38    public static final int LOG_USER = 1 << 3;
39    /** mail system, numerical code 2. */
40    public static final int LOG_MAIL = 2 << 3;
41    /** system daemons, numerical code 3. */
42    public static final int LOG_DAEMON = 3 << 3;
43    /** security/authorization messages, numerical code 4. */
44    public static final int LOG_AUTH = 4 << 3;
45    /** messages generated internally by syslogd, numerical code 5. */
46    public static final int LOG_SYSLOG = 5 << 3;
47    /** line printer subsystem, numerical code 6. */
48    public static final int LOG_LPR = 6 << 3;
49    /** network news subsystem, numerical code 7. */
50    public static final int LOG_NEWS = 7 << 3;
51    /** UUCP subsystem, numerical code 8 */
52    public static final int LOG_UUCP = 8 << 3;
53    /** clock daemon, numerical code 9. */
54    public static final int LOG_CRON = 9 << 3;
55    /** security/authorization  messages, numerical code 10. */
56    public static final int LOG_AUTHPRIV = 10 << 3;
57    /** ftp daemon, numerical code 11. */
58    public static final int LOG_FTP = 11 << 3;
59    /** NTP subsystem, numerical code 12. */
60    public static final int LOG_NTP = 12 << 3;
61    /** log audit, numerical code 13. */
62    public static final int LOG_AUDIT = 13 << 3;
63    /** log alert, numerical code 14. */
64    public static final int LOG_ALERT = 14 << 3;
65    /** clock daemon, numerical code 15. */
66    public static final int LOG_CLOCK = 15 << 3;
67    /** reserved for local use, numerical code 16. */
68    public static final int LOG_LOCAL0 = 16 << 3;
69    /** reserved for local use, numerical code 17. */
70    public static final int LOG_LOCAL1 = 17 << 3;
71    /** reserved for local use, numerical code 18. */
72    public static final int LOG_LOCAL2 = 18 << 3;
73    /** reserved for local use, numerical code 19. */
74    public static final int LOG_LOCAL3 = 19 << 3;
75    /** reserved for local use, numerical code 20. */
76    public static final int LOG_LOCAL4 = 20 << 3;
77    /** reserved for local use, numerical code 21. */
78    public static final int LOG_LOCAL5 = 21 << 3;
79    /** reserved for local use, numerical code 22. */
80    public static final int LOG_LOCAL6 = 22 << 3;
81    /** reserved for local use, numerical code 23.*/
82    public static final int LOG_LOCAL7 = 23 << 3;
83  }