KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > services > log > LoggerImpl


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17
18  */

19
20 package org.apache.pluto.portalImpl.services.log;
21
22 import org.apache.commons.logging.Log;
23 import org.apache.pluto.services.log.Logger;
24
25 public class LoggerImpl implements Logger {
26
27     private Log log = null;
28
29     public LoggerImpl(Log log) {
30         this.log = log;
31     }
32
33     public boolean isDebugEnabled() {
34         return log.isDebugEnabled();
35     }
36
37     public boolean isInfoEnabled() {
38         return log.isInfoEnabled();
39     }
40
41     public boolean isWarnEnabled() {
42         return log.isWarnEnabled();
43     }
44
45     public boolean isErrorEnabled() {
46         return log.isErrorEnabled();
47     }
48
49     public void debug(String JavaDoc aMessage) {
50         log.debug(aMessage);
51     }
52
53     public void debug(String JavaDoc aMessage, Throwable JavaDoc aThrowable) {
54         log.debug(aMessage, aThrowable);
55     }
56
57     public void info(String JavaDoc aMessage) {
58         log.info(aMessage);
59     }
60
61     public void warn(String JavaDoc aMessage) {
62         log.warn(aMessage);
63     }
64
65     public void error(String JavaDoc aMessage) {
66         log.error(aMessage);
67     }
68
69     public void error(String JavaDoc aMessage, Throwable JavaDoc aThrowable) {
70         log.error(aMessage, aThrowable);
71     }
72
73     public void error(Throwable JavaDoc aThrowable) {
74         log.error("Exception caught: ", aThrowable);
75     }
76
77 }
78
Popular Tags