Coverage Report - org.codehaus.plexus.logging.LoggerManager
 
Classes in this File Line Coverage Branch Coverage Complexity
LoggerManager
N/A
N/A
1
 
 1  
 package org.codehaus.plexus.logging;
 2  
 
 3  
 /*
 4  
  * Copyright 2001-2006 Codehaus Foundation.
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *      http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15  
  * See the License for the specific language governing permissions and
 16  
  * limitations under the License.
 17  
  */
 18  
 
 19  
 /**
 20  
  * @author Jason van Zyl
 21  
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
 22  
  * @version $Id$
 23  
  */
 24  
 public interface LoggerManager
 25  
 {
 26  
     String ROLE = LoggerManager.class.getName();
 27  
 
 28  
     /**
 29  
      * Sets the threshold for all new loggers. It will NOT affect the existing loggers.
 30  
      *
 31  
      * This is usually only set once while the logger manager is configured.
 32  
      * 
 33  
      * @param threshold The new threshold.
 34  
      */
 35  
     void setThreshold( int threshold );
 36  
 
 37  
     /**
 38  
      * Returns the current threshold for all new loggers.
 39  
      *
 40  
      * @return Returns the current threshold for all new loggers.
 41  
      */
 42  
     int getThreshold();
 43  
 
 44  
     /**
 45  
      * Sets the threshold for all loggers. It affects all the existing loggers
 46  
      * as well as future loggers.
 47  
      *
 48  
      * @param threshold The new threshold.
 49  
      */
 50  
     void setThresholds( int threshold );
 51  
 
 52  
     // The new stuff
 53  
     void setThreshold( String role, int threshold );
 54  
 
 55  
     void setThreshold( String role, String roleHint, int threshold );
 56  
 
 57  
     int getThreshold( String role );
 58  
 
 59  
     int getThreshold( String role, String roleHint );
 60  
 
 61  
     Logger getLoggerForComponent( String role );
 62  
 
 63  
     Logger getLoggerForComponent( String role, String roleHint );
 64  
 
 65  
     void returnComponentLogger( String role );
 66  
 
 67  
     void returnComponentLogger( String role, String hint );
 68  
 
 69  
     int getActiveLoggerCount();
 70  
 }