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
018 * {@link SyslogAppenderBase}.
019 * 
020 * @author Ceki Gülcü
021 **/
022public class SyslogConstants {
023
024    static public final int SYSLOG_PORT = 514;
025
026    // Following constants extracted from RFC 3164, we multiply them by 8
027    // in order to precompute the facility part of PRI.
028    // See RFC 3164, Section 4.1.1 for exact details.
029
030    /** Emergency: system is unusable */
031    public static final int EMERGENCY_SEVERITY = 0;
032    /** Alert: action must be taken immediately */
033    public static final int ALERT_SEVERITY = 1;
034    /** Critical: critical conditions */
035    public static final int CRITICAL_SEVERITY = 2;
036    /** Error: error conditions */
037    public static final int ERROR_SEVERITY = 3;
038    /** Warning: warning conditions */
039    public static final int WARNING_SEVERITY = 4;
040    /** Notice: normal but significant condition */
041    public static final int NOTICE_SEVERITY = 5;
042    /** Informational: informational messages */
043    public static final int INFO_SEVERITY = 6;
044    /** Debug: debug-level messages */
045    public static final int DEBUG_SEVERITY = 7;
046
047    /** kernel messages, numerical code 0. */
048    public static final int LOG_KERN = 0;
049    /** user-level messages, numerical code 1. */
050    public static final int LOG_USER = 1 << 3;
051    /** mail system, numerical code 2. */
052    public static final int LOG_MAIL = 2 << 3;
053    /** system daemons, numerical code 3. */
054    public static final int LOG_DAEMON = 3 << 3;
055    /** security/authorization messages, numerical code 4. */
056    public static final int LOG_AUTH = 4 << 3;
057    /** messages generated internally by syslogd, numerical code 5. */
058    public static final int LOG_SYSLOG = 5 << 3;
059    /** line printer subsystem, numerical code 6. */
060    public static final int LOG_LPR = 6 << 3;
061    /** network news subsystem, numerical code 7. */
062    public static final int LOG_NEWS = 7 << 3;
063    /** UUCP subsystem, numerical code 8 */
064    public static final int LOG_UUCP = 8 << 3;
065    /** clock daemon, numerical code 9. */
066    public static final int LOG_CRON = 9 << 3;
067    /** security/authorization messages, numerical code 10. */
068    public static final int LOG_AUTHPRIV = 10 << 3;
069    /** ftp daemon, numerical code 11. */
070    public static final int LOG_FTP = 11 << 3;
071    /** NTP subsystem, numerical code 12. */
072    public static final int LOG_NTP = 12 << 3;
073    /** log audit, numerical code 13. */
074    public static final int LOG_AUDIT = 13 << 3;
075    /** log alert, numerical code 14. */
076    public static final int LOG_ALERT = 14 << 3;
077    /** clock daemon, numerical code 15. */
078    public static final int LOG_CLOCK = 15 << 3;
079    /** reserved for local use, numerical code 16. */
080    public static final int LOG_LOCAL0 = 16 << 3;
081    /** reserved for local use, numerical code 17. */
082    public static final int LOG_LOCAL1 = 17 << 3;
083    /** reserved for local use, numerical code 18. */
084    public static final int LOG_LOCAL2 = 18 << 3;
085    /** reserved for local use, numerical code 19. */
086    public static final int LOG_LOCAL3 = 19 << 3;
087    /** reserved for local use, numerical code 20. */
088    public static final int LOG_LOCAL4 = 20 << 3;
089    /** reserved for local use, numerical code 21. */
090    public static final int LOG_LOCAL5 = 21 << 3;
091    /** reserved for local use, numerical code 22. */
092    public static final int LOG_LOCAL6 = 22 << 3;
093    /** reserved for local use, numerical code 23. */
094    public static final int LOG_LOCAL7 = 23 << 3;
095}