org.apache.avalon.framework.logger.Logger.getChildLogger()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.apache.avalon.framework.logger.Logger.getChildLogger()方法的一些代码示例,展示了Logger.getChildLogger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getChildLogger()方法的具体详情如下:
包路径:org.apache.avalon.framework.logger.Logger
类名称:Logger
方法名:getChildLogger

Logger.getChildLogger介绍

[英]Create a new child logger. The name of the child logger is [current-loggers-name].[passed-in-name] Throws IllegalArgumentException if name has an empty element name
[中]创建一个新的子记录器。子记录器的名称为[当前记录器名称]。如果名称的元素名为空,[传入名称]将抛出IllegalArgumentException

代码示例

代码示例来源:origin: commons-logging/commons-logging

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null)
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-logger

/**
 * Retrieve a logger by name.
 *
 * @param name the name of logger
 * @return the specified Logger
 */
public org.apache.avalon.framework.logger.Logger
  getLoggerForCategory( final String name )
{
  return m_logger.getChildLogger( name );
}

代码示例来源:origin: org.apache.fulcrum/fulcrum-parser

/**
 * Provide a logger
 *
 * @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
 */
public void enableLogging(Logger logger)
{
  this.log = logger.getChildLogger("DataStreamParser");
}

代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-logger

public Logger getLoggerForCategory( String categoryName )
{
  return logger.getChildLogger( categoryName );
}

代码示例来源:origin: apache/activemq-artemis

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: apache/activemq-artemis

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: Nextdoor/bender

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: org.apache.tomcat.extras/tomcat-extras-juli-adapters

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.commons.logging

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null)
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Constructs an <code>AvalonLogger</code> that will log to a child
 * of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
 *
 * @param name the name of the avalon logger implementation to delegate to
 */
public AvalonLogger(String name) {
  if (defaultLogger == null) {
    throw new NullPointerException("default logger has to be specified if this constructor is used!");
  }
  this.logger = defaultLogger.getChildLogger(name);
}

代码示例来源:origin: org.apache.fulcrum/fulcrum-intake

/**
 * Enable Avalon Logging
 */
@Override
public void enableLogging(Logger logger)
{
  this.log = logger.getChildLogger(getClass().getSimpleName());
}

代码示例来源:origin: org.apache.fulcrum/fulcrum-intake

/**
 * Enable Avalon Logging
 */
@Override
public void enableLogging(Logger logger)
{
  this.log = logger.getChildLogger(getClass().getSimpleName());
}

代码示例来源:origin: org.apache.fulcrum/fulcrum-intake

/**
 * Enable Avalon Logging
 */
@Override
public void enableLogging(Logger logger)
{
  this.log = logger.getChildLogger(getClass().getSimpleName());
}

代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-instrument-mgr-impl

public void enableLogging( Logger logger )
{
  super.enableLogging( logger );
  
  // Create a child logger for logging setValue and increment calls so
  //  that they can be filtered out.
  m_valueLogger = logger.getChildLogger( "values" );
}

代码示例来源:origin: org.apache.excalibur.components/excalibur-thread-impl

public void enableLogging( final Logger logger )
{
  m_logger = logger;
  m_detailLogger = logger.getChildLogger( "detail" );
  
  // Log a created message here rather as we can't in the constructor
  //  due to the lack of a logger.
  debug( "created." );
}

代码示例来源:origin: org.apache.excalibur.components/excalibur-thread-impl

/**
 * Overide newWorkerThread to provide a WorkerThread
 * that is Poolable and LogEnabled.
 *
 * @param name the name of WorkerThread
 * @return the created WorkerThread
 */
protected WorkerThread newWorkerThread( final String name )
{
  final SimpleWorkerThread thread =
    new SimpleWorkerThread( this, getThreadGroup(), name );
  ContainerUtil.enableLogging( thread, m_logger.getChildLogger( "worker" ) );
  return thread;
}

相关文章