org.glite.security.trustmanager
Class Log4jConfigurator

java.lang.Object
  extended by org.glite.security.trustmanager.Log4jConfigurator

public class Log4jConfigurator
extends java.lang.Object

Class to configure the log4j outside of the other classes allowing the use of slf4j without log4j present.

Author:
hahkala

Constructor Summary
Log4jConfigurator()
           
 
Method Summary
static boolean configure(java.lang.String logConfFile, java.lang.String logFile)
          Configures the log4j logger if needed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jConfigurator

public Log4jConfigurator()
Method Detail

configure

public static boolean configure(java.lang.String logConfFile,
                                java.lang.String logFile)
                         throws java.io.IOException
Configures the log4j logger if needed.

Parameters:
logConfFile - if this is not null, it is used for configuring the logging. Should be a normal log4j configuration file.
logFile - if the logConfFile is null, and this is not null, it is used to define the file where the logging messages go.
Returns:
returns true if the logging was configured, false otherwise.
Throws:
java.io.IOException - Thrown in case the logConfFile loading fails.