org.jboss.util
Class Log4jLoggerFactory

java.lang.Object
  extended byorg.jboss.util.Log4jLoggerFactory

public class Log4jLoggerFactory
extends java.lang.Object

JacORB logger factory that creates named Avalon loggers with log4j as the underlying log mechanism.

JacORB log priorities for new loggers are set implicitly to either the value of this factory's defaultPriority field, or via JacORB configuration properties that have the same name as the requested logger, plus a suffix of .log.verbosity.


Constructor Summary
Log4jLoggerFactory()
           
 
Method Summary
 void configure(Configuration configuration)
           
 java.lang.String getLoggingBackendName()
          Gets the name of the logging back-end mechanism.
 Logger getNamedLogger(java.lang.String name)
          Gets an Avalon logger by name.
 Logger getNamedLogger(java.lang.String name, java.lang.String logFileName, long maxLogSize)
          Creates a named Avalon logger with given logFileName and maxLogSize parameters.
 Logger getNamedRootLogger(java.lang.String name)
          Gets an Avalon root logger by name.
 void setDefaultLogFile(java.lang.String fileName, long maxLogSize)
          set the file name and max file size for logging to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLoggerFactory

public Log4jLoggerFactory()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Throws:
ConfigurationException

getLoggingBackendName

public final java.lang.String getLoggingBackendName()
Gets the name of the logging back-end mechanism.

Returns:
the string "log4j"

getNamedLogger

public Logger getNamedLogger(java.lang.String name)
Gets an Avalon logger by name.

Parameters:
name - the name of the logger
Returns:
an org.apache.avalon.framework.logger.Logger instance

getNamedRootLogger

public Logger getNamedRootLogger(java.lang.String name)
Gets an Avalon root logger by name.

Parameters:
name - the name of the logger
Returns:
an org.apache.avalon.framework.logger.Logger instance

getNamedLogger

public Logger getNamedLogger(java.lang.String name,
                             java.lang.String logFileName,
                             long maxLogSize)
                      throws java.io.IOException
Creates a named Avalon logger with given logFileName and maxLogSize parameters. This is a dummy implementation that always return null.

Parameters:
name - the name of the logger
logFileName - the name of the file to log to
maxLogSize - maximum size of the log file.
Returns:
the new logger (null in this implementation).
Throws:
java.io.IOException

setDefaultLogFile

public void setDefaultLogFile(java.lang.String fileName,
                              long maxLogSize)
                       throws java.io.IOException
set the file name and max file size for logging to a file

Throws:
java.io.IOException