com.googlecode.kevinarpe.papaya.logging.slf4j
Enum SLF4JLogLevel

java.lang.Object
  extended by java.lang.Enum<SLF4JLogLevel>
      extended by com.googlecode.kevinarpe.papaya.logging.slf4j.SLF4JLogLevel
All Implemented Interfaces:
Serializable, Comparable<SLF4JLogLevel>

public enum SLF4JLogLevel
extends Enum<SLF4JLogLevel>

Represents all the well-known logging levels in SLF4J. Create new loggers with this method: newLevelLogger(Logger)

Author:
Kevin Connor ARPE (kevinarpe@gmail.com)
See Also:
SLF4JLevelLogger

Enum Constant Summary
DEBUG
          All logging methods are sent to DEBUG level.
ERROR
          All logging methods are sent to ERROR level.
INFO
          All logging methods are sent to INFO level.
OFF
          Special case: Does not have an underlying logger and all methods do nothing.
TRACE
          All logging methods are sent to TRACE level.
WARN
          All logging methods are sent to WARN level.
 
Method Summary
abstract  SLF4JLevelLogger newLevelLogger(org.slf4j.Logger logger)
          Creates a new logger to only log at a single level.
static SLF4JLogLevel valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SLF4JLogLevel[] 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

OFF

public static final SLF4JLogLevel OFF
Special case: Does not have an underlying logger and all methods do nothing.


ERROR

public static final SLF4JLogLevel ERROR
All logging methods are sent to ERROR level.

See Also:
Logger.error(String)

WARN

public static final SLF4JLogLevel WARN
All logging methods are sent to WARN level.

See Also:
Logger.warn(String)

INFO

public static final SLF4JLogLevel INFO
All logging methods are sent to INFO level.

See Also:
Logger.info(String)

DEBUG

public static final SLF4JLogLevel DEBUG
All logging methods are sent to DEBUG level.

See Also:
Logger.debug(String)

TRACE

public static final SLF4JLogLevel TRACE
All logging methods are sent to TRACE level.

See Also:
Logger.trace(String)
Method Detail

values

public static SLF4JLogLevel[] 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 (SLF4JLogLevel c : SLF4JLogLevel.values())
    System.out.println(c);

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

valueOf

public static SLF4JLogLevel 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

newLevelLogger

public abstract SLF4JLevelLogger newLevelLogger(org.slf4j.Logger logger)
Creates a new logger to only log at a single level.

Parameters:
logger - underlying SLF4J logger
Returns:
new logger
Throws:
NullPointerException - if logger is null


Copyright © 2013-2014. All Rights Reserved.