001: /**
002: * Sequoia: Database clustering technology.
003: * Copyright (C) 2002-2004 French National Institute For Research In Computer
004: * Science And Control (INRIA).
005: * Contact: sequoia@continuent.org
006: *
007: * Licensed under the Apache License, Version 2.0 (the "License");
008: * you may not use this file except in compliance with the License.
009: * You may obtain a copy of the License at
010: *
011: * http://www.apache.org/licenses/LICENSE-2.0
012: *
013: * Unless required by applicable law or agreed to in writing, software
014: * distributed under the License is distributed on an "AS IS" BASIS,
015: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016: * See the License for the specific language governing permissions and
017: * limitations under the License.
018: *
019: * Initial developer(s): Emmanuel Cecchet.
020: * Contributor(s): __________________.
021: */package org.continuent.sequoia.common.log;
022:
023: import org.apache.log4j.Logger;
024:
025: /**
026: * This is a wrapper where logging has been statically disabled. It should
027: * improve the performance if one wants to completely disable traces.
028: *
029: * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
030: * @version 1.0
031: */
032: public class StaticDisabledLogger extends Trace {
033:
034: /**
035: * Creates a new <code>StaticDisabledLogger</code> object from a given
036: * log4j <code>Logger</code>.
037: *
038: * @param log4jLogger the log4j <code>Logger</code>
039: */
040: public StaticDisabledLogger(Logger log4jLogger) {
041: super (log4jLogger);
042: }
043:
044: /**
045: * This method is overriden with an empty body.
046: *
047: * @see org.continuent.sequoia.common.log.Trace#debug(Object, Throwable)
048: */
049: public void debug(Object message, Throwable t) {
050: }
051:
052: /**
053: * This method is overriden with an empty body.
054: *
055: * @see org.continuent.sequoia.common.log.Trace#debug(Object)
056: */
057: public void debug(Object message) {
058: }
059:
060: /**
061: * This method is overriden with an empty body.
062: *
063: * @see org.continuent.sequoia.common.log.Trace#error(Object, Throwable)
064: */
065: public void error(Object message, Throwable t) {
066: }
067:
068: /**
069: * This method is overriden with an empty body.
070: *
071: * @see org.continuent.sequoia.common.log.Trace#error(Object)
072: */
073: public void error(Object message) {
074: }
075:
076: /**
077: * This method is overriden with an empty body.
078: *
079: * @see org.continuent.sequoia.common.log.Trace#fatal(Object, Throwable)
080: */
081: public void fatal(Object message, Throwable t) {
082: }
083:
084: /**
085: * This method is overriden with an empty body.
086: *
087: * @see org.continuent.sequoia.common.log.Trace#fatal(Object)
088: */
089: public void fatal(Object message) {
090: }
091:
092: /**
093: * This method is overriden with an empty body.
094: *
095: * @see org.continuent.sequoia.common.log.Trace#info(Object, Throwable)
096: */
097: public void info(Object message, Throwable t) {
098: }
099:
100: /**
101: * This method is overriden with an empty body.
102: *
103: * @see org.continuent.sequoia.common.log.Trace#info(Object)
104: */
105: public void info(Object message) {
106: }
107:
108: /**
109: * This method is overriden with an empty body.
110: *
111: * @see org.continuent.sequoia.common.log.Trace#warn(Object, Throwable)
112: */
113: public void warn(Object message, Throwable t) {
114: }
115:
116: /**
117: * This method is overriden with an empty body.
118: *
119: * @see org.continuent.sequoia.common.log.Trace#warn(Object)
120: */
121: public void warn(Object message) {
122: }
123:
124: /**
125: * @return <code>false</code>
126: * @see org.continuent.sequoia.common.log.Trace#isDebugEnabled()
127: */
128: public boolean isDebugEnabled() {
129: return false;
130: }
131:
132: /**
133: * @return <code>false</code>
134: * @see org.continuent.sequoia.common.log.Trace#isErrorEnabled()
135: */
136: public boolean isErrorEnabled() {
137: return false;
138: }
139:
140: /**
141: * @return <code>false</code>
142: * @see org.continuent.sequoia.common.log.Trace#isFatalEnabled()
143: */
144: public boolean isFatalEnabled() {
145: return false;
146: }
147:
148: /**
149: * @return <code>false</code>
150: * @see org.continuent.sequoia.common.log.Trace#isInfoEnabled()
151: */
152: public boolean isInfoEnabled() {
153: return false;
154: }
155:
156: /**
157: * @return <code>false</code>
158: * @see org.continuent.sequoia.common.log.Trace#isWarnEnabled()
159: */
160: public boolean isWarnEnabled() {
161: return false;
162: }
163: }
|