public abstract class AbstractLoggingSystem extends LoggingSystem
LoggingSystem
implementations.SYSTEM_PROPERTY
Constructor and Description |
---|
AbstractLoggingSystem(ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
void |
beforeInitialize()
Reset the logging system to be limit output.
|
protected ClassLoader |
getClassLoader() |
protected String |
getPackagedConfigFile(String fileName) |
protected String |
getSelfInitializationConfig()
Return any self initialization config that has been applied.
|
protected abstract String[] |
getStandardConfigLocations()
Return the standard config locations for this system.
|
void |
initialize(String configLocation,
LogFile logFile)
Fully initialize the logging system.
|
protected abstract void |
loadConfiguration(String location,
LogFile logFile)
Load a specific configuration.
|
protected abstract void |
loadDefaults(LogFile logFile)
Load sensible defaults for the logging system.
|
protected void |
reinitialize()
Reinitialize the logging system if required.
|
cleanUp, get, setLogLevel
public AbstractLoggingSystem(ClassLoader classLoader)
public void beforeInitialize()
LoggingSystem
LoggingSystem.initialize(String, LogFile)
to reduce logging noise until the system has
been fully Initialized.beforeInitialize
in class LoggingSystem
public void initialize(String configLocation, LogFile logFile)
LoggingSystem
initialize
in class LoggingSystem
configLocation
- a log configuration location or null
if default
initialization is requiredlogFile
- the log output file that should be written or null
for
console only outputprotected String getSelfInitializationConfig()
getStandardConfigLocations()
and assumes that any file that exists
will have been applied.protected abstract String[] getStandardConfigLocations()
getSelfInitializationConfig()
protected abstract void loadDefaults(LogFile logFile)
logFile
- the file to load or null
if no log file is to be writtenprotected abstract void loadConfiguration(String location, LogFile logFile)
location
- the location of the configuration to load (never null
)logFile
- the file to load or null
if no log file is to be writtenprotected void reinitialize()
getSelfInitializationConfig()
is used and the log file hasn't changed. May
be used to reload configuration (for example to pickup additional System
properties).protected final ClassLoader getClassLoader()
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.