Package com.sun.solaris.service.logging
Class Severity
- java.lang.Object
-
- java.util.logging.Level
-
- com.sun.solaris.service.logging.Severity
-
- All Implemented Interfaces:
java.io.Serializable
public final class Severity extends java.util.logging.Level
syslog(3C)
severity levels defined insys/syslog.h
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Severity
ALERT
LOG_ALERTstatic Severity
CRIT
LOG_CRITstatic Severity
DEBUG
LOG_DEBUGstatic Severity
EMERG
LOG_EMERGstatic Severity
ERR
LOG_ERRstatic Severity
INFO
LOG_INFOstatic Severity
NOTICE
LOG_NOTICEstatic Severity
WARNING
LOG_WARNING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNative()
Returns the nativesyslog(3C)
severity.static Severity
getSeverityWithName(java.lang.String name)
Returns the Severity object with the given name, interpreted case-insensitively.static java.util.logging.Level
parse(java.lang.String name)
Returns the Severity object with the given name, interpreted case-insensitively.static Severity
severityForLevel(java.util.logging.Level l)
Returns the Severity closest in meaning to the given Level.
-
-
-
Field Detail
-
EMERG
public static final Severity EMERG
LOG_EMERG
-
ALERT
public static final Severity ALERT
LOG_ALERT
-
CRIT
public static final Severity CRIT
LOG_CRIT
-
ERR
public static final Severity ERR
LOG_ERR
-
WARNING
public static final Severity WARNING
LOG_WARNING
-
NOTICE
public static final Severity NOTICE
LOG_NOTICE
-
INFO
public static final Severity INFO
LOG_INFO
-
DEBUG
public static final Severity DEBUG
LOG_DEBUG
-
-
Method Detail
-
severityForLevel
public static Severity severityForLevel(java.util.logging.Level l)
Returns the Severity closest in meaning to the given Level. This is meant to be used by SyslogHandler to determine a proper Severity for Records which only specify a Level.- Level.SEVERE or higher becomes Severity.ERR
- Level.WARNING becomes Severity.WARNING
- Level.INFO becomes Severity.INFO
- Level.FINE becomes Severity.DEBUG
-
getNative
public int getNative()
Returns the nativesyslog(3C)
severity.
-
parse
public static java.util.logging.Level parse(java.lang.String name)
Returns the Severity object with the given name, interpreted case-insensitively.- Throws:
java.lang.IllegalArgumentException
- if the name isn't of a known severity.
-
getSeverityWithName
public static Severity getSeverityWithName(java.lang.String name)
Returns the Severity object with the given name, interpreted case-insensitively.- Throws:
java.lang.IllegalArgumentException
- if the name isn't of a known severity.
-
-