public enum LogBackendType extends Enum<LogBackendType> implements LogBackendFactory
Enum Constant and Description |
---|
ANDROID
Android Log mechanism.
|
COMMONS_LOGGING
Apache commons logging.
|
CONSOLE
Simple log backend that writes out to System.out or System.err.
|
JAVA_UTIL
Internal JVM logging implementation almost always available.
|
LOCAL
Local simple log backend that writes to a output file.
|
LOG4J
Old version of the log4j package.
|
LOG4J2
Version 2 of the log4j package.
|
LOGBACK
Logback direct.
|
NULL
Logging backend which ignores all messages.
|
SLF4J
SLF4J which is often paired with logback.
|
Modifier and Type | Method and Description |
---|---|
LogBackend |
createLogBackend(String classLabel)
Create a log backend implementation from the class-label.
|
boolean |
isAvailable()
Return true if the log class is available.
|
static LogBackendType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LogBackendType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LogBackendType SLF4J
public static final LogBackendType ANDROID
WARNING: Android log must be before commons logging since Android provides commons logging but logging messages are ignored that are sent there. Grrrrr.
public static final LogBackendType LOGBACK
public static final LogBackendType COMMONS_LOGGING
public static final LogBackendType LOG4J2
public static final LogBackendType LOG4J
public static final LogBackendType LOCAL
NOTE: any loggers defined below this will not be auto-detected because this is always available.
public static final LogBackendType CONSOLE
public static final LogBackendType JAVA_UTIL
public static final LogBackendType NULL
public static LogBackendType[] values()
for (LogBackendType c : LogBackendType.values()) System.out.println(c);
public static LogBackendType 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 nullpublic LogBackend createLogBackend(String classLabel)
LogBackendFactory
createLogBackend
in interface LogBackendFactory
public boolean isAvailable()
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.