KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > common > log > StaticDisabledLogger


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: c-jdbc@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): __________________.
23  */

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

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

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

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

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

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

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

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

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

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

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

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

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

144   public boolean isDebugEnabled()
145   {
146     return false;
147   }
148
149   /**
150    * @return <code>false</code>
151    * @see org.objectweb.cjdbc.common.log.Trace#isErrorEnabled()
152    */

153   public boolean isErrorEnabled()
154   {
155     return false;
156   }
157
158   /**
159    * @return <code>false</code>
160    * @see org.objectweb.cjdbc.common.log.Trace#isFatalEnabled()
161    */

162   public boolean isFatalEnabled()
163   {
164     return false;
165   }
166
167   /**
168    * @return <code>false</code>
169    * @see org.objectweb.cjdbc.common.log.Trace#isInfoEnabled()
170    */

171   public boolean isInfoEnabled()
172   {
173     return false;
174   }
175
176   /**
177    * @return <code>false</code>
178    * @see org.objectweb.cjdbc.common.log.Trace#isWarnEnabled()
179    */

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