KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > dna > MockLogger


1 /*
2  * Copyright (C) The DNA Group. All rights reserved.
3  *
4  * This software is published under the terms of the DNA
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.dna;
9
10 import org.codehaus.dna.Logger;
11
12 /**
13  *
14  * @author Peter Donald
15  * @version $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $
16  */

17 class MockLogger
18     implements Logger
19 {
20     private final String JavaDoc m_name;
21
22     MockLogger( String JavaDoc name )
23     {
24         m_name = name;
25     }
26
27     String JavaDoc getName()
28     {
29         return m_name;
30     }
31
32     public Logger getChildLogger( final String JavaDoc name )
33     {
34         return new MockLogger( getName() + "." + name );
35     }
36
37     public void trace( String JavaDoc message )
38     {
39     }
40
41     public void trace( String JavaDoc message, Throwable JavaDoc throwable )
42     {
43     }
44
45     public boolean isTraceEnabled()
46     {
47         return false;
48     }
49
50     public void debug( String JavaDoc message )
51     {
52     }
53
54     public void debug( String JavaDoc message, Throwable JavaDoc throwable )
55     {
56     }
57
58     public boolean isDebugEnabled()
59     {
60         return false;
61     }
62
63     public void info( String JavaDoc message )
64     {
65     }
66
67     public void info( String JavaDoc message, Throwable JavaDoc throwable )
68     {
69     }
70
71     public boolean isInfoEnabled()
72     {
73         return false;
74     }
75
76     public void warn( String JavaDoc message )
77     {
78     }
79
80     public void warn( String JavaDoc message, Throwable JavaDoc throwable )
81     {
82     }
83
84     public boolean isWarnEnabled()
85     {
86         return false;
87     }
88
89     public void error( String JavaDoc message )
90     {
91     }
92
93     public void error( String JavaDoc message, Throwable JavaDoc throwable )
94     {
95     }
96
97     public boolean isErrorEnabled()
98     {
99         return false;
100     }
101 }
102
Popular Tags