本文整理了Java中org.apache.log.Logger.getChildLogger()
方法的一些代码示例,展示了Logger.getChildLogger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getChildLogger()
方法的具体详情如下:
包路径:org.apache.log.Logger
类名称:Logger
方法名:getChildLogger
[英]Create a new child logger. The category of child logger is [current-category].subcategory
[中]创建一个新的子记录器。子记录器的类别为[当前类别]。子类别
代码示例来源:origin: org.apache.avalon.framework/avalon-framework-impl
/**
* Create a new child logger.
* The name of the child logger is [current-loggers-name].[passed-in-name]
* Throws <code>IllegalArgumentException</code> if name has an empty element name
*
* @param name the subname of this logger
* @return the new logger
*/
public final Logger getChildLogger( final String name )
{
return new LogKitLogger( m_logger.getChildLogger( name ) );
}
}
代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit
/**
* Retrieve a logger for named category.
*
* @param category the context
* @return the Logger
*/
public Logger getLoggerFor( final String category )
{
return getRootLogger().getChildLogger( category );
}
代码示例来源:origin: org.apache.avalon.framework/avalon-framework-impl
/**
* Helper method to setup other components with logger.
* The logger has the subcategory of this components logger.
*
* @param component the component to pass logger object to
* @param subCategory the subcategory to use (may be null)
*/
protected void setupLogger( final Object component, final String subCategory )
{
org.apache.log.Logger logger = m_logger;
if( null != subCategory )
{
logger = m_logger.getChildLogger( subCategory );
}
setupLogger( component, logger );
}
代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit
return m_children[ i ].getChildLogger( remainder );
return child.getChildLogger( remainder );
代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-logger
m_logkitLogger.getChildLogger( name );
内容来源于网络,如有侵权,请联系作者删除!