org.apache.logging.log4j.core.net
Enum Facility

java.lang.Object
  extended by java.lang.Enum<Facility>
      extended by org.apache.logging.log4j.core.net.Facility
All Implemented Interfaces:
Serializable, Comparable<Facility>

public enum Facility
extends Enum<Facility>

The facility codes used by the Syslog system. Numerical Facility
Code
0 kernel messages
1 user-level messages
2 mail system
3 system daemons
4 security/authorization messages
5 messages generated internally by syslogd
6 line printer subsystem
7 network news subsystem
8 UUCP subsystem
9 clock daemon
10 security/authorization messages
11 FTP daemon
12 NTP subsystem
13 log audit
14 log alert
15 clock daemon (note 2)
16 local use 0 (local0)
17 local use 1 (local1)
18 local use 2 (local2)
19 local use 3 (local3)
20 local use 4 (local4)
21 local use 5 (local5)
22 local use 6 (local6)
23 local use 7 (local7)


Enum Constant Summary
AUTH
          Security/Authorization messages.
AUTHPRIV
          Security/Authorization messages.
CLOCK
          Clock daemon.
CRON
          Clock daemon.
DAEMON
          System daemons.
FTP
          FTP daemon.
KERN
          Kernel messages.
LOCAL0
          Local use 0.
LOCAL1
          Local use 1.
LOCAL2
          Local use 2.
LOCAL3
          Local use 3.
LOCAL4
          Local use 4.
LOCAL5
          Local use 5.
LOCAL6
          Local use 6.
LOCAL7
          Local use 7.
LOG_ALERT
          Log alert.
LOG_AUDIT
          Log audit.
LPR
          Line printer subsystem.
MAIL
          Mail system.
NEWS
          Network news subsystem.
NTP
          NTP subsystem.
SYSLOG
          Messages generated by syslogd.
USER
          User level messages.
UUCP
          UUCP subsystem.
 
Method Summary
 int getCode()
          Retrieve the value of the enumeration.
 boolean isEqual(String name)
          Determine if this enumeration matches the specified name (ignoring case).
static Facility toFacility(String name)
          Returns the Facility for the given string.
static Facility toFacility(String name, Facility defaultFacility)
          Returns the Facility for the given string.
static Facility valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Facility[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

KERN

public static final Facility KERN
Kernel messages.


USER

public static final Facility USER
User level messages.


MAIL

public static final Facility MAIL
Mail system.


DAEMON

public static final Facility DAEMON
System daemons.


AUTH

public static final Facility AUTH
Security/Authorization messages.


SYSLOG

public static final Facility SYSLOG
Messages generated by syslogd.


LPR

public static final Facility LPR
Line printer subsystem.


NEWS

public static final Facility NEWS
Network news subsystem.


UUCP

public static final Facility UUCP
UUCP subsystem.


CRON

public static final Facility CRON
Clock daemon.


AUTHPRIV

public static final Facility AUTHPRIV
Security/Authorization messages.


FTP

public static final Facility FTP
FTP daemon.


NTP

public static final Facility NTP
NTP subsystem.


LOG_AUDIT

public static final Facility LOG_AUDIT
Log audit.


LOG_ALERT

public static final Facility LOG_ALERT
Log alert.


CLOCK

public static final Facility CLOCK
Clock daemon.


LOCAL0

public static final Facility LOCAL0
Local use 0.


LOCAL1

public static final Facility LOCAL1
Local use 1.


LOCAL2

public static final Facility LOCAL2
Local use 2.


LOCAL3

public static final Facility LOCAL3
Local use 3.


LOCAL4

public static final Facility LOCAL4
Local use 4.


LOCAL5

public static final Facility LOCAL5
Local use 5.


LOCAL6

public static final Facility LOCAL6
Local use 6.


LOCAL7

public static final Facility LOCAL7
Local use 7.

Method Detail

values

public static Facility[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Facility c : Facility.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Facility valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toFacility

public static Facility toFacility(String name)
Returns the Facility for the given string.

Parameters:
name - The Facility enum name, case-insensitive. If null, returns, null
Returns:
a Facility enum value or null if name is null

toFacility

public static Facility toFacility(String name,
                                  Facility defaultFacility)
Returns the Facility for the given string.

Parameters:
name - The Facility enum name, case-insensitive. If null, returns, defaultFacility
defaultFacility - the Facility to return if name is null
Returns:
a Facility enum value or null if name is null

getCode

public int getCode()
Retrieve the value of the enumeration.

Returns:
The value associated with the enumeration.

isEqual

public boolean isEqual(String name)
Determine if this enumeration matches the specified name (ignoring case).

Parameters:
name - The name to check.
Returns:
true if the name matches this enumeration, ignoring case.


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.