/** * Return the default Logger. This is basically the same * as getting the Logger for the "" category. */ public Logger getDefaultLogger() { return new LogKitLogger( m_hierarchy.getRootLogger() ); } }
/** * 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 ) ); } }
/** * Actually create a logger for the given category. * The result will be cached by * <code>AbstractLoggerManager.getLoggerForCategory()</code>. */ protected Logger doGetLoggerForCategory( final String fullCategoryName ) { return new LogKitLogger( m_hierarchy.getLoggerFor( fullCategoryName ) ); }
public void setLogger( final Logger logger ) { enableLogging( new LogKitLogger( logger ) ); }
public Logger getLoggerForCategory( String categoryName ) { if( null != m_loggerManager ) { return m_loggerManager.getLoggerForCategory( categoryName ); } else { return new LogKitLogger( getLogKitLoggerForCategory( categoryName ) ); } }
public void setLogger( org.apache.log.Logger logger ) { m_logkitLogger = logger; // are we already enabled if ( this.getLogger() == null ) { enableLogging( new LogKitLogger( logger ) ); } }
/** * Return the Logger for the specified category. * <p> * * In LogKit getRootLogger() and getLoggerFor("") * unless the logger for category "" has been explicitly * configured return identically configured but different * loggers. * * <p> * Our LogKitConfHelper configures getRootLogger(), not getLoggerFor(""). * We think this is a reasonable behavior and expect that LogKit * Hierarchies configured by other means then LogKitConfHelper are * configured in the same way. * * <p> * This justifies our decision to return getRootLogger() when given * "" category name. */ public Logger getLoggerForCategory( final String categoryName ) { if ( categoryName == null || categoryName.length() == 0 ) { return getDefaultLogger(); } else { return new LogKitLogger( m_hierarchy.getLoggerFor( categoryName ) ); } }
new LogKitLogger( lmDefaultLogger ), new LogKitLogger( lmLogger ) ); loggerManager.contextualize( m_context ); loggerManager.configure( loggerManagerConfig );
m_logEnabledLogger = new LogKitLogger( m_logger );
m_loggers.put( fullCategory, new LogKitLogger( logger ) ); if( getLogger().isDebugEnabled() )
Logger lmLogger = Hierarchy.getDefaultHierarchy().getLoggerFor( lmLoggerName ); lmLogger.setPriority( lmPriority ); logKitManager.enableLogging( new LogKitLogger( lmLogger ) ); logKitManager.contextualize( context ); logKitManager.configure( confLM );