View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.container.services.log;
18  
19  import org.apache.pluto.services.log.Logger;
20  import org.apache.commons.logging.Log;
21  
22  /***
23   * ContainerLoggerAdaptor
24   *
25   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
26   * @version $Id: ContainerLoggerAdaptor.java 516448 2007-03-09 16:25:47Z ate $
27   */
28  public class ContainerLoggerAdaptor implements Logger
29  {
30      private Log log = null;
31  
32      public ContainerLoggerAdaptor(Log log) 
33      {
34          this.log = log;
35      }
36      
37      /* (non-Javadoc)
38       * @see org.apache.pluto.services.log.Logger#isDebugEnabled()
39       */
40      public boolean isDebugEnabled()
41      {
42          return log.isDebugEnabled();
43      }
44      
45      /* (non-Javadoc)
46       * @see org.apache.pluto.services.log.Logger#isInfoEnabled()
47       */
48      public boolean isInfoEnabled()
49      {
50          return log.isInfoEnabled();
51      }
52      
53      /* (non-Javadoc)
54       * @see org.apache.pluto.services.log.Logger#isWarnEnabled()
55       */
56      public boolean isWarnEnabled()
57      {
58          return log.isWarnEnabled();
59      }
60      
61      /* (non-Javadoc)
62       * @see org.apache.pluto.services.log.Logger#isErrorEnabled()
63       */
64      public boolean isErrorEnabled()
65      {
66          return log.isErrorEnabled();
67      }
68      
69      /* (non-Javadoc)
70       * @see org.apache.pluto.services.log.Logger#debug(java.lang.String)
71       */
72      public void debug(String aMessage)
73      {
74          log.debug(aMessage);    
75      }
76      
77      /* (non-Javadoc)
78       * @see org.apache.pluto.services.log.Logger#debug(java.lang.String, java.lang.Throwable)
79       */
80      public void debug(String aMessage, Throwable aThrowable)
81      {
82          log.debug(aMessage, aThrowable);
83      }
84      
85      /* (non-Javadoc)
86       * @see org.apache.pluto.services.log.Logger#info(java.lang.String)
87       */
88      public void info(String aMessage)
89      {
90          log.info(aMessage);
91      }
92      
93      /* (non-Javadoc)
94       * @see org.apache.pluto.services.log.Logger#warn(java.lang.String)
95       */
96      public void warn(String aMessage)
97      {
98          log.warn(aMessage);
99      }
100     
101     /* (non-Javadoc)
102      * @see org.apache.pluto.services.log.Logger#error(java.lang.String)
103      */
104     public void error(String aMessage)
105     {
106         log.error(aMessage);
107     }
108     
109     /* (non-Javadoc)
110      * @see org.apache.pluto.services.log.Logger#error(java.lang.String, java.lang.Throwable)
111      */
112     public void error(String aMessage, Throwable aThrowable)
113     {
114         log.error(aMessage, aThrowable);
115     }
116     
117     /* (non-Javadoc)
118      * @see org.apache.pluto.services.log.Logger#error(java.lang.Throwable)
119      */
120     public void error(Throwable aThrowable)
121     {
122         log.error(aThrowable);
123     }
124     
125 }