Package org.nuxeo.log4j
Class Log4JHelper
java.lang.Object
org.nuxeo.log4j.Log4JHelper
Provides helper methods for working with log4j
- Since:
 - 5.4.2
 - Author:
 - jcarsique
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetFileAppendersFileNames(File log4jConfigurationFile) getFileAppendersFileNames(org.apache.logging.log4j.core.config.Configuration configuration) Returns list of files produced byFileAppenders defined in a givenConfiguration.static org.apache.logging.log4j.core.config.ConfigurationnewConfiguration(File log4jConfigurationFile) Creates aConfigurationinitialized with given log4j configuration file without making this configuration active.static voidSet DEBUG level on the given logger. 
- 
Constructor Details
- 
Log4JHelper
public Log4JHelper() 
 - 
 - 
Method Details
- 
getFileAppendersFileNames
public static List<String> getFileAppendersFileNames(org.apache.logging.log4j.core.config.Configuration configuration) Returns list of files produced byFileAppenders defined in a givenConfiguration. There's no need for the log4j configuration corresponding to this repository of being active.- Parameters:
 configuration- theConfigurationto browse looking forFileAppender- Returns:
 FileAppenders present in configuration- Since:
 - 10.3
 
 - 
newConfiguration
public static org.apache.logging.log4j.core.config.Configuration newConfiguration(File log4jConfigurationFile) Creates aConfigurationinitialized with given log4j configuration file without making this configuration active.- Parameters:
 log4jConfigurationFile- the XML configuration file to load- Returns:
 Configurationinitialized with log4jConfigurationFile- Since:
 - 10.3
 
 - 
getFileAppendersFileNames
- Parameters:
 log4jConfigurationFile- the XML configuration file to load- Returns:
 FileAppenders defined in log4jConfigurationFile- Since:
 - 10.3
 - See Also:
 
 - 
setLevel
public static void setLevel(String[] loggerNames, org.apache.logging.log4j.Level level, boolean includeChildren) Set DEBUG level on the given logger.- Parameters:
 loggerNames- the logger names to change levellevel- the level to setincludeChildren- whether or not to change children levels- Since:
 - 10.3
 
 
 -