public abstract class LoggingSystem extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NONE
The value of the
SYSTEM_PROPERTY that can be used to indicate that no
LoggingSystem should be used. |
static String |
SYSTEM_PROPERTY
A System property that can be used to indicate the
LoggingSystem to use. |
Constructor and Description |
---|
LoggingSystem() |
Modifier and Type | Method and Description |
---|---|
abstract void |
beforeInitialize()
Reset the logging system to be limit output.
|
void |
cleanUp()
Clean up the logging system.
|
static LoggingSystem |
get(ClassLoader classLoader)
Detect and return the logging system in use.
|
Runnable |
getShutdownHandler()
Returns a
Runnable that can handle shutdown of this logging system when the
JVM exits. |
void |
initialize(LoggingInitializationContext initializationContext,
String configLocation,
LogFile logFile)
Fully initialize the logging system.
|
abstract void |
setLogLevel(String loggerName,
LogLevel level)
Sets the logging level for a given logger.
|
public static final String SYSTEM_PROPERTY
LoggingSystem
to use.public static final String NONE
SYSTEM_PROPERTY
that can be used to indicate that no
LoggingSystem
should be used.public abstract void beforeInitialize()
initialize(LoggingInitializationContext, String, LogFile)
to reduce
logging noise until the system has been fully initialized.public void initialize(LoggingInitializationContext initializationContext, String configLocation, LogFile logFile)
initializationContext
- the logging initialization contextconfigLocation
- a log configuration location or null
if default
initialization is requiredlogFile
- the log output file that should be written or null
for
console only outputpublic void cleanUp()
public Runnable getShutdownHandler()
Runnable
that can handle shutdown of this logging system when the
JVM exits. The default implementation returns null
, indicating that no
shutdown is required.null
public abstract void setLogLevel(String loggerName, LogLevel level)
loggerName
- the name of the logger to setlevel
- the log levelpublic static LoggingSystem get(ClassLoader classLoader)
classLoader
- the classloaderCopyright © 2017 Pivotal Software, Inc.. All rights reserved.