org.apache.log.Logger.unsetLogTargets()方法的使用及代码示例

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

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

Logger.unsetLogTargets介绍

[英]Unset the logtargets for this logger. This logger (and thus all child loggers who don't specify logtargets) will inherit from the parents LogTargets.
[中]取消设置此记录器的日志目标。此记录器(以及所有未指定logtargets的子记录器)将从父logtargets继承。

代码示例

代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit

/**
 * Unset the logtargets for this logger.
 * This logger (and thus all child loggers who don't specify logtargets) will
 * inherit from the parents LogTargets.
 */
public synchronized void unsetLogTargets()
{
  unsetLogTargets( false );
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity

/** Close all destinations*/
public void shutdown()
{
  logger.unsetLogTargets();
}

代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity

/** Close all destinations*/
public void shutdown()
{
  logger.unsetLogTargets();
}

代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit

/**
 * Protected constructor for use inside the logging toolkit.
 * You should not be using this constructor directly.
 *
 * @param errorHandler the ErrorHandler logger uses to log errors
 * @param category the fully qualified name of category
 * @param logTargets the LogTargets associated with logger
 * @param parent the parent logger (used for inheriting from)
 */
Logger( final ErrorHandler errorHandler,
    final LoggerListener loggerListener,
    final String category,
    final LogTarget[] logTargets,
    final Logger parent )
{
  m_errorHandler = errorHandler;
  m_loggerListener = loggerListener;
  m_category = category;
  m_logTargets = logTargets;
  m_parent = parent;
  if( null == m_logTargets )
  {
    unsetLogTargets();
  }
  unsetPriority();
}

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

m_hierarchy.getRootLogger().unsetLogTargets( true );
final ErrorHandler errorHandler = new OurErrorHandler( getLogger() );
m_hierarchy.setErrorHandler( errorHandler );

相关文章