public class Log4JHelper extends Object
Constructor and Description |
---|
Log4JHelper() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
getFileAppendersFileNames(org.apache.logging.log4j.core.config.Configuration configuration)
Returns list of files produced by
FileAppender s defined in a given Configuration . |
static List<String> |
getFileAppendersFileNames(File log4jConfigurationFile) |
static org.apache.logging.log4j.core.config.Configuration |
newConfiguration(File log4jConfigurationFile)
Creates a
Configuration initialized with given log4j configuration file without making this
configuration active. |
static void |
setLevel(String[] loggerNames,
org.apache.logging.log4j.Level level,
boolean includeChildren)
Set DEBUG level on the given logger.
|
public Log4JHelper()
public static List<String> getFileAppendersFileNames(org.apache.logging.log4j.core.config.Configuration configuration)
FileAppender
s defined in a given Configuration
. There's no
need for the log4j configuration corresponding to this repository of being active.configuration
- the Configuration
to browse looking for FileAppender
FileAppender
s present in configurationpublic static org.apache.logging.log4j.core.config.Configuration newConfiguration(File log4jConfigurationFile)
Configuration
initialized with given log4j configuration file without making this
configuration active.log4jConfigurationFile
- the XML configuration file to loadConfiguration
initialized with log4jConfigurationFilepublic static List<String> getFileAppendersFileNames(File log4jConfigurationFile)
log4jConfigurationFile
- the XML configuration file to loadFileAppender
s defined in log4jConfigurationFilegetFileAppendersFileNames(Configuration)
public static void setLevel(String[] loggerNames, org.apache.logging.log4j.Level level, boolean includeChildren)
loggerNames
- the logger names to change levellevel
- the level to setincludeChildren
- whether or not to change children levelsCopyright © 2019 Nuxeo. All rights reserved.