View Javadoc

1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.core.net;
15  
16  /**
17   * Constants used by syslog daemon and transitively by {@link SyslogAppenderBase}.
18   * 
19   * @author Ceki Gülcü
20   **/
21  public class SyslogConstants {
22    
23    static public final int SYSLOG_PORT = 514;
24    
25    
26    // Following constants extracted from RFC 3164, we multiply them by 8
27    // in order to precompute the facility part of PRI.
28    // See RFC 3164, Section 4.1.1 for exact details.
29  
30    /** Emergency: system is unusable */
31    public static final int EMERGENCY_SEVERITY = 0;       
32    /** Alert: action must be taken immediately */
33    public static final int ALERT_SEVERITY = 1;       
34    /**  Critical: critical conditions */
35    public static final int CRITICAL_SEVERITY = 2;  
36    /** Error: error conditions */
37    public static final int ERROR_SEVERITY = 3;  
38    /** Warning: warning conditions */
39    public static final int WARNING_SEVERITY = 4;  
40    /** Notice: normal but significant condition */
41    public static final int NOTICE_SEVERITY = 5;  
42    /**  Informational: informational messages */
43    public static final int INFO_SEVERITY = 6;  
44    /** Debug: debug-level messages */
45    public static final int DEBUG_SEVERITY = 7;  
46    
47    
48    /** kernel messages, numerical code 0. */
49    public static final int LOG_KERN = 0;
50    /** user-level messages, numerical code 1. */
51    public static final int LOG_USER = 1 << 3;
52    /** mail system, numerical code 2. */
53    public static final int LOG_MAIL = 2 << 3;
54    /** system daemons, numerical code 3. */
55    public static final int LOG_DAEMON = 3 << 3;
56    /** security/authorization messages, numerical code 4. */
57    public static final int LOG_AUTH = 4 << 3;
58    /** messages generated internally by syslogd, numerical code 5. */
59    public static final int LOG_SYSLOG = 5 << 3;
60    /** line printer subsystem, numerical code 6. */
61    public static final int LOG_LPR = 6 << 3;
62    /** network news subsystem, numerical code 7. */
63    public static final int LOG_NEWS = 7 << 3;
64    /** UUCP subsystem, numerical code 8 */
65    public static final int LOG_UUCP = 8 << 3;
66    /** clock daemon, numerical code 9. */
67    public static final int LOG_CRON = 9 << 3;
68    /** security/authorization  messages, numerical code 10. */
69    public static final int LOG_AUTHPRIV = 10 << 3;
70    /** ftp daemon, numerical code 11. */
71    public static final int LOG_FTP = 11 << 3;
72    /** NTP subsystem, numerical code 12. */
73    public static final int LOG_NTP = 12 << 3;
74    /** log audit, numerical code 13. */
75    public static final int LOG_AUDIT = 13 << 3;
76    /** log alert, numerical code 14. */
77    public static final int LOG_ALERT = 14 << 3;
78    /** clock daemon, numerical code 15. */
79    public static final int LOG_CLOCK = 15 << 3;
80    /** reserved for local use, numerical code 16. */
81    public static final int LOG_LOCAL0 = 16 << 3;
82    /** reserved for local use, numerical code 17. */
83    public static final int LOG_LOCAL1 = 17 << 3;
84    /** reserved for local use, numerical code 18. */
85    public static final int LOG_LOCAL2 = 18 << 3;
86    /** reserved for local use, numerical code 19. */
87    public static final int LOG_LOCAL3 = 19 << 3;
88    /** reserved for local use, numerical code 20. */
89    public static final int LOG_LOCAL4 = 20 << 3;
90    /** reserved for local use, numerical code 21. */
91    public static final int LOG_LOCAL5 = 21 << 3;
92    /** reserved for local use, numerical code 22. */
93    public static final int LOG_LOCAL6 = 22 << 3;
94    /** reserved for local use, numerical code 23.*/
95    public static final int LOG_LOCAL7 = 23 << 3;
96  }