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

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

本文整理了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

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

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

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

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

  1. /**
  2. * Retrieve a logger by name.
  3. *
  4. * @param name the name of logger
  5. * @return the specified Logger
  6. */
  7. public org.apache.avalon.framework.logger.Logger
  8. getLoggerForCategory( final String name )
  9. {
  10. return m_logger.getChildLogger( name );
  11. }

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

  1. /**
  2. * Provide a logger
  3. *
  4. * @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
  5. */
  6. public void enableLogging(Logger logger)
  7. {
  8. this.log = logger.getChildLogger("DataStreamParser");
  9. }

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

  1. public Logger getLoggerForCategory( String categoryName )
  2. {
  3. return logger.getChildLogger( categoryName );
  4. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. /**
  2. * Enable Avalon Logging
  3. */
  4. @Override
  5. public void enableLogging(Logger logger)
  6. {
  7. this.log = logger.getChildLogger(getClass().getSimpleName());
  8. }

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

  1. /**
  2. * Enable Avalon Logging
  3. */
  4. @Override
  5. public void enableLogging(Logger logger)
  6. {
  7. this.log = logger.getChildLogger(getClass().getSimpleName());
  8. }

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

  1. /**
  2. * Enable Avalon Logging
  3. */
  4. @Override
  5. public void enableLogging(Logger logger)
  6. {
  7. this.log = logger.getChildLogger(getClass().getSimpleName());
  8. }

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

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

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

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

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

  1. /**
  2. * Overide newWorkerThread to provide a WorkerThread
  3. * that is Poolable and LogEnabled.
  4. *
  5. * @param name the name of WorkerThread
  6. * @return the created WorkerThread
  7. */
  8. protected WorkerThread newWorkerThread( final String name )
  9. {
  10. final SimpleWorkerThread thread =
  11. new SimpleWorkerThread( this, getThreadGroup(), name );
  12. ContainerUtil.enableLogging( thread, m_logger.getChildLogger( "worker" ) );
  13. return thread;
  14. }

相关文章