public class Log4J2LoggingSystem extends Slf4JLoggingSystem
LoggingSystem for Log4j 2.SYSTEM_PROPERTY| Constructor and Description |
|---|
Log4J2LoggingSystem(ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeInitialize()
Reset the logging system to be limit output.
|
protected String[] |
getStandardConfigLocations()
Return the standard config locations for this system.
|
void |
initialize(String configLocation,
LogFile logFile)
Fully initialize the logging system.
|
protected boolean |
isClassAvailable(String className) |
protected void |
loadConfiguration(String location,
LogFile logFile)
Load a specific configuration.
|
protected void |
loadDefaults(LogFile logFile)
Load sensible defaults for the logging system.
|
protected void |
reinitialize()
Reinitialize the logging system if required.
|
void |
setLogLevel(String loggerName,
LogLevel level)
Sets the logging level for a given logger.
|
cleanUpgetClassLoader, getPackagedConfigFile, getSelfInitializationConfiggetpublic Log4J2LoggingSystem(ClassLoader classLoader)
protected String[] getStandardConfigLocations()
AbstractLoggingSystemgetStandardConfigLocations in class AbstractLoggingSystemAbstractLoggingSystem.getSelfInitializationConfig()protected boolean isClassAvailable(String className)
public void beforeInitialize()
LoggingSystemLoggingSystem.initialize(String, LogFile) to reduce logging noise until the system has
been fully Initialized.beforeInitialize in class Slf4JLoggingSystempublic void initialize(String configLocation, LogFile logFile)
LoggingSysteminitialize in class AbstractLoggingSystemconfigLocation - 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 void loadDefaults(LogFile logFile)
AbstractLoggingSystemloadDefaults in class AbstractLoggingSystemlogFile - the file to load or null if no log file is to be writtenprotected void loadConfiguration(String location, LogFile logFile)
AbstractLoggingSystemloadConfiguration in class AbstractLoggingSystemlocation - 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()
AbstractLoggingSystemAbstractLoggingSystem.getSelfInitializationConfig() is used and the log file hasn't changed. May
be used to reload configuration (for example to pickup additional System
properties).reinitialize in class AbstractLoggingSystempublic void setLogLevel(String loggerName, LogLevel level)
LoggingSystemsetLogLevel in class LoggingSystemloggerName - the name of the logger to setlevel - the log levelCopyright © 2015 Pivotal Software, Inc.. All rights reserved.