View Javadoc
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 Logger
25  {
26      /** Typecode for debugging messages. */
27      int LEVEL_DEBUG = 0;
28  
29      /** Typecode for informational messages. */
30      int LEVEL_INFO = 1;
31  
32      /** Typecode for warning messages. */
33      int LEVEL_WARN = 2;
34  
35      /** Typecode for error messages. */
36      int LEVEL_ERROR = 3;
37  
38      /** Typecode for fatal error messages. */
39      int LEVEL_FATAL = 4;
40  
41      /** Typecode for disabled log levels. */
42      int LEVEL_DISABLED = 5;
43  
44      void debug( String message );
45  
46      void debug( String message, Throwable throwable );
47  
48      boolean isDebugEnabled();
49  
50      void info( String message );
51  
52      void info( String message, Throwable throwable );
53  
54      boolean isInfoEnabled();
55  
56      void warn( String message );
57  
58      void warn( String message, Throwable throwable );
59  
60      boolean isWarnEnabled();
61  
62      void error( String message );
63  
64      void error( String message, Throwable throwable );
65  
66      boolean isErrorEnabled();
67  
68      void fatalError( String message );
69  
70      void fatalError( String message, Throwable throwable );
71  
72      boolean isFatalErrorEnabled();
73  
74      Logger getChildLogger( String name );
75  
76      int getThreshold();
77  
78      void setThreshold( int threshold );
79  
80      String getName();
81  }