001: /*
002: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017: */
018:
019: package org.mandarax.util.logging;
020:
021: /**
022: * Null logger - does nothing.
023: * @see LoggerFactory
024: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
025: * @version 3.4 <7 March 05>
026: * @since 3.3
027: */
028: public class NullLogger implements Logger {
029:
030: /**
031: * Constructor.
032: */
033: NullLogger() {
034: super ();
035: }
036:
037: /**
038: * Log an error.
039: * @param message a message
040: * @param exception an exception or error
041: */
042: public void error(String message, Throwable exception) {
043: }
044:
045: /**
046: * Log a warning.
047: * @param message a message
048: * @param exception an exception or error
049: */
050: public void warn(String message, Throwable exception) {
051: }
052:
053: /**
054: * Log an info message.
055: * @param message a message
056: * @param exception an exception or error
057: */
058: public void info(String message, Throwable exception) {
059: }
060:
061: /**
062: * Log a debug message.
063: * @param message a message
064: * @param exception an exception or error
065: */
066: public void debug(String message, Throwable exception) {
067: }
068:
069: /**
070: * Log an error.
071: * @param message a message
072: */
073: public void error(String message) {
074: }
075:
076: /**
077: * Log a message.
078: * @param message a message
079: */
080: public void warn(String message) {
081: }
082:
083: /**
084: * Log a message.
085: * @param message a message
086: */
087: public void info(String message) {
088: }
089:
090: /**
091: * Log a message.
092: * @param message a message
093: */
094: public void debug(String message) {
095: }
096:
097: /**
098: * Indicates whether logging on the DEBUG level is enabled.
099: * @return a boolean
100: */
101: public boolean isDebugEnabled() {
102: return false;
103: }
104:
105: /**
106: * Indicates whether logging on the INFO level is enabled.
107: * @return a boolean
108: */
109: public boolean isInfoEnabled() {
110: return true;
111: }
112:
113: }
|