站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 iiop API Documentation 英文版文档

Log4jLoggerFactory (JBoss IIOP Plugin API) - JBoss 3.2.7 iiop API Documentation 英文版文档


org.jboss.util
Class Log4jLoggerFactory

java.lang.Object
  extended byorg.jboss.util.Log4jLoggerFactory
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.jacorb.config.LoggerFactory

public class Log4jLoggerFactory
extends Object
implements org.jacorb.config.LoggerFactory

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.

Version:
$Revision: 1.1.2.2 $
Author:
Francisco Reverbel

Constructor Summary
Log4jLoggerFactory()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 String getLoggingBackendName()
          Gets the name of the logging back-end mechanism.
 org.apache.avalon.framework.logger.Logger getNamedLogger(String name)
          Gets an Avalon logger by name.
 org.apache.avalon.framework.logger.Logger getNamedLogger(String name, String logFileName, long maxLogSize)
          Creates a named Avalon logger with given logFileName and maxLogSize parameters.
 org.apache.avalon.framework.logger.Logger getNamedRootLogger(String name)
          Gets an Avalon root logger by name.
 void setDefaultLogFile(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(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getLoggingBackendName

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

Specified by:
getLoggingBackendName in interface org.jacorb.config.LoggerFactory
Returns:
the string "log4j"

getNamedLogger

public org.apache.avalon.framework.logger.Logger getNamedLogger(String name)
Gets an Avalon logger by name.

Specified by:
getNamedLogger in interface org.jacorb.config.LoggerFactory
Parameters:
name - the name of the logger
Returns:
an org.apache.avalon.framework.logger.Logger instance

getNamedRootLogger

public org.apache.avalon.framework.logger.Logger getNamedRootLogger(String name)
Gets an Avalon root logger by name.

Specified by:
getNamedRootLogger in interface org.jacorb.config.LoggerFactory
Parameters:
name - the name of the logger
Returns:
an org.apache.avalon.framework.logger.Logger instance

getNamedLogger

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

Specified by:
getNamedLogger in interface org.jacorb.config.LoggerFactory
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:
IOException

setDefaultLogFile

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

Specified by:
setDefaultLogFile in interface org.jacorb.config.LoggerFactory
Throws:
IOException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.