KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > common > log > StaticDisabledLogger


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: sequoia@continuent.org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * Initial developer(s): Emmanuel Cecchet.
20  * Contributor(s): __________________.
21  */

22
23 package org.continuent.sequoia.common.log;
24
25 import org.apache.log4j.Logger;
26
27 /**
28  * This is a wrapper where logging has been statically disabled. It should
29  * improve the performance if one wants to completely disable traces.
30  *
31  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
32  * @version 1.0
33  */

34 public class StaticDisabledLogger extends Trace
35 {
36
37   /**
38    * Creates a new <code>StaticDisabledLogger</code> object from a given
39    * log4j <code>Logger</code>.
40    *
41    * @param log4jLogger the log4j <code>Logger</code>
42    */

43   public StaticDisabledLogger(Logger log4jLogger)
44   {
45     super(log4jLogger);
46   }
47
48   /**
49    * This method is overriden with an empty body.
50    *
51    * @see org.continuent.sequoia.common.log.Trace#debug(Object, Throwable)
52    */

53   public void debug(Object JavaDoc message, Throwable JavaDoc t)
54   {
55   }
56
57   /**
58    * This method is overriden with an empty body.
59    *
60    * @see org.continuent.sequoia.common.log.Trace#debug(Object)
61    */

62   public void debug(Object JavaDoc message)
63   {
64   }
65
66   /**
67    * This method is overriden with an empty body.
68    *
69    * @see org.continuent.sequoia.common.log.Trace#error(Object, Throwable)
70    */

71   public void error(Object JavaDoc message, Throwable JavaDoc t)
72   {
73   }
74
75   /**
76    * This method is overriden with an empty body.
77    *
78    * @see org.continuent.sequoia.common.log.Trace#error(Object)
79    */

80   public void error(Object JavaDoc message)
81   {
82   }
83
84   /**
85    * This method is overriden with an empty body.
86    *
87    * @see org.continuent.sequoia.common.log.Trace#fatal(Object, Throwable)
88    */

89   public void fatal(Object JavaDoc message, Throwable JavaDoc t)
90   {
91   }
92
93   /**
94    * This method is overriden with an empty body.
95    *
96    * @see org.continuent.sequoia.common.log.Trace#fatal(Object)
97    */

98   public void fatal(Object JavaDoc message)
99   {
100   }
101
102   /**
103    * This method is overriden with an empty body.
104    *
105    * @see org.continuent.sequoia.common.log.Trace#info(Object, Throwable)
106    */

107   public void info(Object JavaDoc message, Throwable JavaDoc t)
108   {
109   }
110
111   /**
112    * This method is overriden with an empty body.
113    *
114    * @see org.continuent.sequoia.common.log.Trace#info(Object)
115    */

116   public void info(Object JavaDoc message)
117   {
118   }
119
120   /**
121    * This method is overriden with an empty body.
122    *
123    * @see org.continuent.sequoia.common.log.Trace#warn(Object, Throwable)
124    */

125   public void warn(Object JavaDoc message, Throwable JavaDoc t)
126   {
127   }
128
129   /**
130    * This method is overriden with an empty body.
131    *
132    * @see org.continuent.sequoia.common.log.Trace#warn(Object)
133    */

134   public void warn(Object JavaDoc message)
135   {
136   }
137
138   /**
139    * @return <code>false</code>
140    * @see org.continuent.sequoia.common.log.Trace#isDebugEnabled()
141    */

142   public boolean isDebugEnabled()
143   {
144     return false;
145   }
146
147   /**
148    * @return <code>false</code>
149    * @see org.continuent.sequoia.common.log.Trace#isErrorEnabled()
150    */

151   public boolean isErrorEnabled()
152   {
153     return false;
154   }
155
156   /**
157    * @return <code>false</code>
158    * @see org.continuent.sequoia.common.log.Trace#isFatalEnabled()
159    */

160   public boolean isFatalEnabled()
161   {
162     return false;
163   }
164
165   /**
166    * @return <code>false</code>
167    * @see org.continuent.sequoia.common.log.Trace#isInfoEnabled()
168    */

169   public boolean isInfoEnabled()
170   {
171     return false;
172   }
173
174   /**
175    * @return <code>false</code>
176    * @see org.continuent.sequoia.common.log.Trace#isWarnEnabled()
177    */

178   public boolean isWarnEnabled()
179   {
180     return false;
181   }
182 }
183
Popular Tags