View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, 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      // Following constants extracted from RFC 3164, we multiply them by 8
26      // in order to precompute the facility part of PRI.
27      // See RFC 3164, Section 4.1.1 for exact details.
28  
29      /** Emergency: system is unusable */
30      public static final int EMERGENCY_SEVERITY = 0;
31      /** Alert: action must be taken immediately */
32      public static final int ALERT_SEVERITY = 1;
33      /**  Critical: critical conditions */
34      public static final int CRITICAL_SEVERITY = 2;
35      /** Error: error conditions */
36      public static final int ERROR_SEVERITY = 3;
37      /** Warning: warning conditions */
38      public static final int WARNING_SEVERITY = 4;
39      /** Notice: normal but significant condition */
40      public static final int NOTICE_SEVERITY = 5;
41      /**  Informational: informational messages */
42      public static final int INFO_SEVERITY = 6;
43      /** Debug: debug-level messages */
44      public static final int DEBUG_SEVERITY = 7;
45  
46      /** kernel messages, numerical code 0. */
47      public static final int LOG_KERN = 0;
48      /** user-level messages, numerical code 1. */
49      public static final int LOG_USER = 1 << 3;
50      /** mail system, numerical code 2. */
51      public static final int LOG_MAIL = 2 << 3;
52      /** system daemons, numerical code 3. */
53      public static final int LOG_DAEMON = 3 << 3;
54      /** security/authorization messages, numerical code 4. */
55      public static final int LOG_AUTH = 4 << 3;
56      /** messages generated internally by syslogd, numerical code 5. */
57      public static final int LOG_SYSLOG = 5 << 3;
58      /** line printer subsystem, numerical code 6. */
59      public static final int LOG_LPR = 6 << 3;
60      /** network news subsystem, numerical code 7. */
61      public static final int LOG_NEWS = 7 << 3;
62      /** UUCP subsystem, numerical code 8 */
63      public static final int LOG_UUCP = 8 << 3;
64      /** clock daemon, numerical code 9. */
65      public static final int LOG_CRON = 9 << 3;
66      /** security/authorization  messages, numerical code 10. */
67      public static final int LOG_AUTHPRIV = 10 << 3;
68      /** ftp daemon, numerical code 11. */
69      public static final int LOG_FTP = 11 << 3;
70      /** NTP subsystem, numerical code 12. */
71      public static final int LOG_NTP = 12 << 3;
72      /** log audit, numerical code 13. */
73      public static final int LOG_AUDIT = 13 << 3;
74      /** log alert, numerical code 14. */
75      public static final int LOG_ALERT = 14 << 3;
76      /** clock daemon, numerical code 15. */
77      public static final int LOG_CLOCK = 15 << 3;
78      /** reserved for local use, numerical code 16. */
79      public static final int LOG_LOCAL0 = 16 << 3;
80      /** reserved for local use, numerical code 17. */
81      public static final int LOG_LOCAL1 = 17 << 3;
82      /** reserved for local use, numerical code 18. */
83      public static final int LOG_LOCAL2 = 18 << 3;
84      /** reserved for local use, numerical code 19. */
85      public static final int LOG_LOCAL3 = 19 << 3;
86      /** reserved for local use, numerical code 20. */
87      public static final int LOG_LOCAL4 = 20 << 3;
88      /** reserved for local use, numerical code 21. */
89      public static final int LOG_LOCAL5 = 21 << 3;
90      /** reserved for local use, numerical code 22. */
91      public static final int LOG_LOCAL6 = 22 << 3;
92      /** reserved for local use, numerical code 23.*/
93      public static final int LOG_LOCAL7 = 23 << 3;
94  }