Package org.nuxeo.log4j
Class Log4JHelper
- java.lang.Object
-
- org.nuxeo.log4j.Log4JHelper
-
public class Log4JHelper extends Object
Provides helper methods for working with log4j- Since:
- 5.4.2
- Author:
- jcarsique
-
-
Constructor Summary
Constructors Constructor Description Log4JHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
getFileAppendersFileNames(File log4jConfigurationFile)
static List<String>
getFileAppendersFileNames(Configuration configuration)
Returns list of files produced byFileAppender
s defined in a givenConfiguration
.static Configuration
newConfiguration(File log4jConfigurationFile)
Creates aConfiguration
initialized with given log4j configuration file without making this configuration active.static void
setLevel(String[] loggerNames, Level level, boolean includeChildren)
Set DEBUG level on the given logger.
-
-
-
Constructor Detail
-
Log4JHelper
public Log4JHelper()
-
-
Method Detail
-
getFileAppendersFileNames
public static List<String> getFileAppendersFileNames(Configuration configuration)
Returns list of files produced byFileAppender
s defined in a givenConfiguration
. There's no need for the log4j configuration corresponding to this repository of being active.- Parameters:
configuration
- theConfiguration
to browse looking forFileAppender
- Returns:
FileAppender
s present in configuration- Since:
- 10.3
-
newConfiguration
public static Configuration newConfiguration(File log4jConfigurationFile)
Creates aConfiguration
initialized with given log4j configuration file without making this configuration active.- Parameters:
log4jConfigurationFile
- the XML configuration file to load- Returns:
Configuration
initialized with log4jConfigurationFile- Since:
- 10.3
-
getFileAppendersFileNames
public static List<String> getFileAppendersFileNames(File log4jConfigurationFile)
- Parameters:
log4jConfigurationFile
- the XML configuration file to load- Returns:
FileAppender
s defined in log4jConfigurationFile- Since:
- 10.3
- See Also:
getFileAppendersFileNames(Configuration)
-
-