Nuxeo Enterprise Platform 5.4

org.nuxeo.log4j
Class Log4JHelper

java.lang.Object
  extended by org.nuxeo.log4j.Log4JHelper

public class Log4JHelper
extends Object

Provides helper methods for working with log4j

Since:
5.4.2
Author:
jcarsique

Constructor Summary
Log4JHelper()
           
 
Method Summary
static ArrayList<String> getFileAppendersFiles(File log4jConfigurationFile)
           
static ArrayList<String> getFileAppendersFiles(LoggerRepository loggerRepository)
          Returns list of files produced by FileAppenders defined in a given LoggerRepository.
static LoggerRepository getNewLoggerRepository(File log4jConfigurationFile)
          Creates a LoggerRepository initialized with given log4j configuration file without making this configuration active.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JHelper

public Log4JHelper()
Method Detail

getFileAppendersFiles

public static ArrayList<String> getFileAppendersFiles(LoggerRepository loggerRepository)
Returns list of files produced by FileAppenders defined in a given LoggerRepository. There's no need for the log4j configuration corresponding to this repository of being active.

Parameters:
loggerRepository - LoggerRepository to browse looking for FileAppender
Returns:
FileAppenders configured in loggerRepository

getNewLoggerRepository

public static LoggerRepository getNewLoggerRepository(File log4jConfigurationFile)
Creates a LoggerRepository initialized with given log4j configuration file without making this configuration active.

Parameters:
log4jConfigurationFile - XML Log4J configuration file to load.
Returns:
LoggerRepository initialized with log4jConfigurationFile

getFileAppendersFiles

public static ArrayList<String> getFileAppendersFiles(File log4jConfigurationFile)
Parameters:
log4jConfigurationFile -
Returns:
FileAppenders defined in log4jConfigurationFile
See Also:
getFileAppendersFiles(LoggerRepository)

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.