public enum SupportLoggers extends Enum<SupportLoggers>
SupportLoggers are custom MarkedLoggers for specialized use. Methods create new
marked loggers with the enum names as markers. There is one factory method variant for each style of logger creation:
getLogger(Class)getLogger(String)getLogger(Logger)Applications should configure logback or other logging system by marker:
ALERTAPPLICATIONAUDITTRACE| Enum Constant and Description |
|---|
ALERT
Marks "ALERT" loggers for system issues.
|
APPLICATION
Unmarked loggers for normal logging.
|
AUDIT
Marks "AUDIT" loggers to record an audit trail, typically to a database.
|
TRACE
Trace loggers (
XLogger for debugging. |
| Modifier and Type | Method and Description |
|---|---|
org.slf4j.Logger |
getLogger(Class<?> logger)
Creates a new marked logger for the given logger.
|
org.slf4j.Logger |
getLogger(org.slf4j.Logger logger)
Creates a new marked logger for the given logger.
|
org.slf4j.Logger |
getLogger(String logger)
Creates a new marked logger for the given logger.
|
static org.slf4j.ext.XLogger |
trace(Class<?> logger)
Redundant method for
TRACE returning XLogger. |
static org.slf4j.ext.XLogger |
trace(String logger)
Redundant method for
TRACE returning XLogger. |
static SupportLoggers |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SupportLoggers[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SupportLoggers ALERT
WARN level
(throws IllegalStateException).public static final SupportLoggers APPLICATION
public static final SupportLoggers AUDIT
INFO level (throws IllegalStateException).public static final SupportLoggers TRACE
XLogger for debugging.public static SupportLoggers[] values()
for (SupportLoggers c : SupportLoggers.values()) System.out.println(c);
public static SupportLoggers valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnull public static org.slf4j.ext.XLogger trace(@Nonnull Class<?> logger)
TRACE returning XLogger.logger - the logger class, never missing@Nonnull public static org.slf4j.ext.XLogger trace(@Nonnull String logger)
TRACE returning XLogger.logger - the logger name, never missing@Nonnull public org.slf4j.Logger getLogger(@Nonnull Class<?> logger)
logger - the underlying class, never missing@Nonnull public org.slf4j.Logger getLogger(@Nonnull String logger)
logger - the underlying logger name, never missingCopyright © 2013–2015 binkley's BLOG. All rights reserved.