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   *
21   * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
22   * @version $Revision$ $Date$
23   */
24  class MockLogger
25      implements Logger
26  {
27      private final String m_name;
28  
29      MockLogger( String name )
30      {
31          m_name = name;
32      }
33  
34      public String getName()
35      {
36          return m_name;
37      }
38  
39      public Logger getChildLogger( final String name )
40      {
41          return new MockLogger( getName() + "." + name );
42      }
43  
44      public void debug( String message )
45      {
46      }
47  
48      public void debug( String message, Throwable throwable )
49      {
50      }
51  
52      public boolean isDebugEnabled()
53      {
54          return false;
55      }
56  
57      public void info( String message )
58      {
59      }
60  
61      public void info( String message, Throwable throwable )
62      {
63      }
64  
65      public boolean isInfoEnabled()
66      {
67          return false;
68      }
69  
70      public void warn( String message )
71      {
72      }
73  
74      public void warn( String message, Throwable throwable )
75      {
76      }
77  
78      public boolean isWarnEnabled()
79      {
80          return false;
81      }
82  
83      public boolean isFatalErrorEnabled()
84      {
85          return false;
86      }
87  
88      public void fatalError( String message )
89      {
90      }
91  
92      public void fatalError( String message, Throwable throwable )
93      {
94      }
95  
96      public void error( String message )
97      {
98      }
99  
100     public void error( String message, Throwable throwable )
101     {
102     }
103 
104     public boolean isErrorEnabled()
105     {
106         return false;
107     }
108 
109     public int getThreshold()
110     {
111         return 0;
112     }
113 
114     public void setThreshold( int threshold )
115     {
116     }
117 }