001/**
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v1.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014package ch.qos.logback.core.net;
015
016/**
017 * Constants used by syslog daemon and transitively by {@link SyslogAppenderBase}.
018 * 
019 * @author Ceki Gülcü
020 **/
021public class SyslogConstants {
022
023    static public final int SYSLOG_PORT = 514;
024
025    // Following constants extracted from RFC 3164, we multiply them by 8
026    // in order to precompute the facility part of PRI.
027    // See RFC 3164, Section 4.1.1 for exact details.
028
029    /** Emergency: system is unusable */
030    public static final int EMERGENCY_SEVERITY = 0;
031    /** Alert: action must be taken immediately */
032    public static final int ALERT_SEVERITY = 1;
033    /**  Critical: critical conditions */
034    public static final int CRITICAL_SEVERITY = 2;
035    /** Error: error conditions */
036    public static final int ERROR_SEVERITY = 3;
037    /** Warning: warning conditions */
038    public static final int WARNING_SEVERITY = 4;
039    /** Notice: normal but significant condition */
040    public static final int NOTICE_SEVERITY = 5;
041    /**  Informational: informational messages */
042    public static final int INFO_SEVERITY = 6;
043    /** Debug: debug-level messages */
044    public static final int DEBUG_SEVERITY = 7;
045
046    /** kernel messages, numerical code 0. */
047    public static final int LOG_KERN = 0;
048    /** user-level messages, numerical code 1. */
049    public static final int LOG_USER = 1 << 3;
050    /** mail system, numerical code 2. */
051    public static final int LOG_MAIL = 2 << 3;
052    /** system daemons, numerical code 3. */
053    public static final int LOG_DAEMON = 3 << 3;
054    /** security/authorization messages, numerical code 4. */
055    public static final int LOG_AUTH = 4 << 3;
056    /** messages generated internally by syslogd, numerical code 5. */
057    public static final int LOG_SYSLOG = 5 << 3;
058    /** line printer subsystem, numerical code 6. */
059    public static final int LOG_LPR = 6 << 3;
060    /** network news subsystem, numerical code 7. */
061    public static final int LOG_NEWS = 7 << 3;
062    /** UUCP subsystem, numerical code 8 */
063    public static final int LOG_UUCP = 8 << 3;
064    /** clock daemon, numerical code 9. */
065    public static final int LOG_CRON = 9 << 3;
066    /** security/authorization  messages, numerical code 10. */
067    public static final int LOG_AUTHPRIV = 10 << 3;
068    /** ftp daemon, numerical code 11. */
069    public static final int LOG_FTP = 11 << 3;
070    /** NTP subsystem, numerical code 12. */
071    public static final int LOG_NTP = 12 << 3;
072    /** log audit, numerical code 13. */
073    public static final int LOG_AUDIT = 13 << 3;
074    /** log alert, numerical code 14. */
075    public static final int LOG_ALERT = 14 << 3;
076    /** clock daemon, numerical code 15. */
077    public static final int LOG_CLOCK = 15 << 3;
078    /** reserved for local use, numerical code 16. */
079    public static final int LOG_LOCAL0 = 16 << 3;
080    /** reserved for local use, numerical code 17. */
081    public static final int LOG_LOCAL1 = 17 << 3;
082    /** reserved for local use, numerical code 18. */
083    public static final int LOG_LOCAL2 = 18 << 3;
084    /** reserved for local use, numerical code 19. */
085    public static final int LOG_LOCAL3 = 19 << 3;
086    /** reserved for local use, numerical code 20. */
087    public static final int LOG_LOCAL4 = 20 << 3;
088    /** reserved for local use, numerical code 21. */
089    public static final int LOG_LOCAL5 = 21 << 3;
090    /** reserved for local use, numerical code 22. */
091    public static final int LOG_LOCAL6 = 22 << 3;
092    /** reserved for local use, numerical code 23.*/
093    public static final int LOG_LOCAL7 = 23 << 3;
094}