View Javadoc

1   /*
2    * HapiLog.java
3    * 
4    * Created on May 7, 2003 at 2:23:45 PM
5    */
6   package ca.uhn.log;
7   
8   import org.slf4j.Logger;
9   import org.slf4j.Marker;
10  
11  /**
12   * Provides a base implementation of the <code>HapiLog</code> interface.
13   * 
14   * It delegates all method calls declared by <code>Log</code> to the delegate specified in
15   * the contructor.
16   * 
17   * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
18   * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:52 $ by $Author: jamesagnew $
19   * @deprecated use slf4j logger class
20   */
21  public class HapiLogImpl implements HapiLog {
22      
23      HapiLogImpl( Logger delegate ) {
24          this.delegate = delegate;
25      }
26      
27  	/** 
28  	 * @deprecated Not available in slf4j. Use e.g. {@link #error(String, Throwable)} instead
29  	 */
30  	public void error(Exception e) {
31  		delegate.error(e.getMessage(), e);
32  	}
33      
34      public String getName() {
35  		return delegate.getName();
36  	}
37  
38  	public boolean isTraceEnabled() {
39  		return delegate.isTraceEnabled();
40  	}
41  
42  	public void trace(String msg) {
43  		delegate.trace(msg);
44  	}
45  
46  	public void trace(String format, Object arg) {
47  		delegate.trace(format, arg);
48  	}
49  
50  	public void trace(String format, Object arg1, Object arg2) {
51  		delegate.trace(format, arg1, arg2);
52  	}
53  
54  	public void trace(String format, Object[] argArray) {
55  		delegate.trace(format, argArray);
56  	}
57  
58  	public void trace(String msg, Throwable t) {
59  		delegate.trace(msg, t);
60  	}
61  
62  	public boolean isTraceEnabled(Marker marker) {
63  		return delegate.isTraceEnabled(marker);
64  	}
65  
66  	public void trace(Marker marker, String msg) {
67  		delegate.trace(marker, msg);
68  	}
69  
70  	public void trace(Marker marker, String format, Object arg) {
71  		delegate.trace(marker, format, arg);
72  	}
73  
74  	public void trace(Marker marker, String format, Object arg1, Object arg2) {
75  		delegate.trace(marker, format, arg1, arg2);
76  	}
77  
78  	public void trace(Marker marker, String format, Object[] argArray) {
79  		delegate.trace(marker, format, argArray);
80  	}
81  
82  	public void trace(Marker marker, String msg, Throwable t) {
83  		delegate.trace(marker, msg, t);
84  	}
85  
86  	public boolean isDebugEnabled() {
87  		return delegate.isDebugEnabled();
88  	}
89  
90  	public void debug(String msg) {
91  		delegate.debug(msg);
92  	}
93  
94  	public void debug(String format, Object arg) {
95  		delegate.debug(format, arg);
96  	}
97  
98  	public void debug(String format, Object arg1, Object arg2) {
99  		delegate.debug(format, arg1, arg2);
100 	}
101 
102 	public void debug(String format, Object[] argArray) {
103 		delegate.debug(format, argArray);
104 	}
105 
106 	public void debug(String msg, Throwable t) {
107 		delegate.debug(msg, t);
108 	}
109 
110 	public boolean isDebugEnabled(Marker marker) {
111 		return delegate.isDebugEnabled(marker);
112 	}
113 
114 	public void debug(Marker marker, String msg) {
115 		delegate.debug(marker, msg);
116 	}
117 
118 	public void debug(Marker marker, String format, Object arg) {
119 		delegate.debug(marker, format, arg);
120 	}
121 
122 	public void debug(Marker marker, String format, Object arg1, Object arg2) {
123 		delegate.debug(marker, format, arg1, arg2);
124 	}
125 
126 	public void debug(Marker marker, String format, Object[] argArray) {
127 		delegate.debug(marker, format, argArray);
128 	}
129 
130 	public void debug(Marker marker, String msg, Throwable t) {
131 		delegate.debug(marker, msg, t);
132 	}
133 
134 	public boolean isInfoEnabled() {
135 		return delegate.isInfoEnabled();
136 	}
137 
138 	public void info(String msg) {
139 		delegate.info(msg);
140 	}
141 
142 	public void info(String format, Object arg) {
143 		delegate.info(format, arg);
144 	}
145 
146 	public void info(String format, Object arg1, Object arg2) {
147 		delegate.info(format, arg1, arg2);
148 	}
149 
150 	public void info(String format, Object[] argArray) {
151 		delegate.info(format, argArray);
152 	}
153 
154 	public void info(String msg, Throwable t) {
155 		delegate.info(msg, t);
156 	}
157 
158 	public boolean isInfoEnabled(Marker marker) {
159 		return delegate.isInfoEnabled(marker);
160 	}
161 
162 	public void info(Marker marker, String msg) {
163 		delegate.info(marker, msg);
164 	}
165 
166 	public void info(Marker marker, String format, Object arg) {
167 		delegate.info(marker, format, arg);
168 	}
169 
170 	public void info(Marker marker, String format, Object arg1, Object arg2) {
171 		delegate.info(marker, format, arg1, arg2);
172 	}
173 
174 	public void info(Marker marker, String format, Object[] argArray) {
175 		delegate.info(marker, format, argArray);
176 	}
177 
178 	public void info(Marker marker, String msg, Throwable t) {
179 		delegate.info(marker, msg, t);
180 	}
181 
182 	public boolean isWarnEnabled() {
183 		return delegate.isWarnEnabled();
184 	}
185 
186 	public void warn(String msg) {
187 		delegate.warn(msg);
188 	}
189 
190 	public void warn(String format, Object arg) {
191 		delegate.warn(format, arg);
192 	}
193 
194 	public void warn(String format, Object[] argArray) {
195 		delegate.warn(format, argArray);
196 	}
197 
198 	public void warn(String format, Object arg1, Object arg2) {
199 		delegate.warn(format, arg1, arg2);
200 	}
201 
202 	public void warn(String msg, Throwable t) {
203 		delegate.warn(msg, t);
204 	}
205 
206 	public boolean isWarnEnabled(Marker marker) {
207 		return delegate.isWarnEnabled(marker);
208 	}
209 
210 	public void warn(Marker marker, String msg) {
211 		delegate.warn(marker, msg);
212 	}
213 
214 	public void warn(Marker marker, String format, Object arg) {
215 		delegate.warn(marker, format, arg);
216 	}
217 
218 	public void warn(Marker marker, String format, Object arg1, Object arg2) {
219 		delegate.warn(marker, format, arg1, arg2);
220 	}
221 
222 	public void warn(Marker marker, String format, Object[] argArray) {
223 		delegate.warn(marker, format, argArray);
224 	}
225 
226 	public void warn(Marker marker, String msg, Throwable t) {
227 		delegate.warn(marker, msg, t);
228 	}
229 
230 	public boolean isErrorEnabled() {
231 		return delegate.isErrorEnabled();
232 	}
233 	
234 	public void error(String msg) {
235 		delegate.error(msg);
236 	}
237 
238 	public void error(String format, Object arg) {
239 		delegate.error(format, arg);
240 	}
241 
242 	public void error(String format, Object arg1, Object arg2) {
243 		delegate.error(format, arg1, arg2);
244 	}
245 
246 	public void error(String format, Object[] argArray) {
247 		delegate.error(format, argArray);
248 	}
249 
250 	public void error(String msg, Throwable t) {
251 		delegate.error(msg, t);
252 	}
253 
254 	public boolean isErrorEnabled(Marker marker) {
255 		return delegate.isErrorEnabled(marker);
256 	}
257 
258 	public void error(Marker marker, String msg) {
259 		delegate.error(marker, msg);
260 	}
261 
262 	public void error(Marker marker, String format, Object arg) {
263 		delegate.error(marker, format, arg);
264 	}
265 
266 	public void error(Marker marker, String format, Object arg1, Object arg2) {
267 		delegate.error(marker, format, arg1, arg2);
268 	}
269 
270 	public void error(Marker marker, String format, Object[] argArray) {
271 		delegate.error(marker, format, argArray);
272 	}
273 
274 	public void error(Marker marker, String msg, Throwable t) {
275 		delegate.error(marker, msg, t);
276 	}
277 
278 	private final Logger delegate;
279     
280 
281     
282 }