001: /*
002: * Copyright (c) 2004-2007 QOS.ch
003: * All rights reserved.
004: *
005: * Permission is hereby granted, free of charge, to any person obtaining
006: * a copy of this software and associated documentation files (the
007: * "Software"), to deal in the Software without restriction, including
008: * without limitation the rights to use, copy, modify, merge, publish,
009: * distribute, sublicense, and/or sell copies of the Software, and to
010: * permit persons to whom the Software is furnished to do so, subject to
011: * the following conditions:
012: *
013: * The above copyright notice and this permission notice shall be
014: * included in all copies or substantial portions of the Software.
015: *
016: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
017: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
018: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
019: * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
020: * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
021: * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
022: * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
023: */
024:
025: package org.slf4j.helpers;
026:
027: import org.slf4j.Logger;
028: import org.slf4j.Marker;
029:
030: /**
031: * This class serves as base for adapters or native implementations of logging systems
032: * lacking Marker support. In this implementation, methods taking marker data
033: * simply invoke the corresponding method without the Marker argument, discarding
034: * any marker data passed as argument.
035: *
036: * @author Ceki Gulcu
037: */
038: public abstract class MarkerIgnoringBase implements Logger {
039:
040: public boolean isTraceEnabled(Marker marker) {
041: return isTraceEnabled();
042: }
043:
044: public void trace(Marker marker, String msg) {
045: debug(msg);
046: }
047:
048: public void trace(Marker marker, String format, Object arg) {
049: debug(format, arg);
050: }
051:
052: public void trace(Marker marker, String format, Object arg1,
053: Object arg2) {
054: debug(format, arg1, arg2);
055: }
056:
057: public void trace(Marker marker, String format, Object[] argArray) {
058: debug(format, argArray);
059: }
060:
061: public void trace(Marker marker, String msg, Throwable t) {
062: debug(msg, t);
063: }
064:
065: public boolean isDebugEnabled(Marker marker) {
066: return isDebugEnabled();
067: }
068:
069: public void debug(Marker marker, String msg) {
070: debug(msg);
071: }
072:
073: public void debug(Marker marker, String format, Object arg) {
074: debug(format, arg);
075: }
076:
077: public void debug(Marker marker, String format, Object arg1,
078: Object arg2) {
079: debug(format, arg1, arg2);
080: }
081:
082: public void debug(Marker marker, String format, Object[] argArray) {
083: debug(format, argArray);
084: }
085:
086: public void debug(Marker marker, String msg, Throwable t) {
087: debug(msg, t);
088: }
089:
090: public boolean isInfoEnabled(Marker marker) {
091: return isInfoEnabled();
092: }
093:
094: public void info(Marker marker, String msg) {
095: info(msg);
096: }
097:
098: public void info(Marker marker, String format, Object arg) {
099: info(format, arg);
100: }
101:
102: public void info(Marker marker, String format, Object arg1,
103: Object arg2) {
104: info(format, arg1, arg2);
105: }
106:
107: public void info(Marker marker, String format, Object[] argArray) {
108: info(format, argArray);
109: }
110:
111: public void info(Marker marker, String msg, Throwable t) {
112: info(msg, t);
113: }
114:
115: public boolean isWarnEnabled(Marker marker) {
116: return isWarnEnabled();
117: }
118:
119: public void warn(Marker marker, String msg) {
120: warn(msg);
121: }
122:
123: public void warn(Marker marker, String format, Object arg) {
124: warn(format, arg);
125: }
126:
127: public void warn(Marker marker, String format, Object arg1,
128: Object arg2) {
129: warn(format, arg1, arg2);
130: }
131:
132: public void warn(Marker marker, String format, Object[] argArray) {
133: warn(format, argArray);
134: }
135:
136: public void warn(Marker marker, String msg, Throwable t) {
137: warn(msg, t);
138: }
139:
140: public boolean isErrorEnabled(Marker marker) {
141: return isErrorEnabled();
142: }
143:
144: public void error(Marker marker, String msg) {
145: error(msg);
146: }
147:
148: public void error(Marker marker, String format, Object arg) {
149: error(format, arg);
150: }
151:
152: public void error(Marker marker, String format, Object arg1,
153: Object arg2) {
154: error(format, arg1, arg2);
155: }
156:
157: public void error(Marker marker, String format, Object[] argArray) {
158: error(format, argArray);
159: }
160:
161: public void error(Marker marker, String msg, Throwable t) {
162: error(msg, t);
163: }
164:
165: public String toString() {
166: return this .getClass().getName() + "(" + getName() + ")";
167: }
168: }
|