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 implements Logger {
25      private final String m_name;
26  
27      MockLogger(String name) {
28          m_name = name;
29      }
30  
31      public String getName() {
32          return m_name;
33      }
34  
35      public Logger getChildLogger(final String name) {
36          return new MockLogger(getName() + "." + name);
37      }
38  
39      public void debug(String message) {}
40  
41      public void debug(String message, Throwable throwable) {}
42  
43      public boolean isDebugEnabled() {
44          return false;
45      }
46  
47      public void info(String message) {}
48  
49      public void info(String message, Throwable throwable) {}
50  
51      public boolean isInfoEnabled() {
52          return false;
53      }
54  
55      public void warn(String message) {}
56  
57      public void warn(String message, Throwable throwable) {}
58  
59      public boolean isWarnEnabled() {
60          return false;
61      }
62  
63      public boolean isFatalErrorEnabled() {
64          return false;
65      }
66  
67      public void fatalError(String message) {}
68  
69      public void fatalError(String message, Throwable throwable) {}
70  
71      public void error(String message) {}
72  
73      public void error(String message, Throwable throwable) {}
74  
75      public boolean isErrorEnabled() {
76          return false;
77      }
78  
79      public int getThreshold() {
80          return 0;
81      }
82  
83      public void setThreshold(int threshold) {}
84  }