1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.kernel.log;
24  
25  /**
26   * <a href="LogWrapper.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class LogWrapper implements Log {
32  
33      public LogWrapper(Log log) {
34          _log = log;
35      }
36  
37      public void setLog(Log log) {
38          _log = log;
39      }
40  
41      public void debug(Object msg) {
42          _log.debug(msg);
43      }
44  
45      public void debug(Throwable t) {
46          _log.debug(t);
47      }
48  
49      public void debug(Object msg, Throwable t) {
50          _log.debug(msg, t);
51      }
52  
53      public void error(Object msg) {
54          _log.error(msg);
55      }
56  
57      public void error(Throwable t) {
58          _log.error(t);
59      }
60  
61      public void error(Object msg, Throwable t) {
62          _log.error(msg, t);
63      }
64  
65      public void fatal(Object msg) {
66          _log.fatal(msg);
67      }
68  
69      public void fatal(Throwable t) {
70          _log.fatal(t);
71      }
72  
73      public void fatal(Object msg, Throwable t) {
74          _log.fatal(msg, t);
75      }
76  
77      public void info(Object msg) {
78          _log.info(msg);
79      }
80  
81      public void info(Throwable t) {
82          _log.info(t);
83      }
84  
85      public void info(Object msg, Throwable t) {
86          _log.info(msg, t);
87      }
88  
89      public boolean isDebugEnabled() {
90          return _log.isDebugEnabled();
91      }
92  
93      public boolean isErrorEnabled() {
94          return _log.isErrorEnabled();
95      }
96  
97      public boolean isFatalEnabled() {
98          return _log.isFatalEnabled();
99      }
100 
101     public boolean isInfoEnabled() {
102         return _log.isInfoEnabled();
103     }
104 
105     public boolean isTraceEnabled() {
106         return _log.isTraceEnabled();
107     }
108 
109     public boolean isWarnEnabled() {
110         return _log.isWarnEnabled();
111     }
112 
113     public void trace(Object msg) {
114         _log.trace(msg);
115     }
116 
117     public void trace(Throwable t) {
118         _log.trace(t);
119     }
120 
121     public void trace(Object msg, Throwable t) {
122         _log.trace(msg, t);
123     }
124 
125     public void warn(Object msg) {
126         _log.warn(msg);
127     }
128 
129     public void warn(Throwable t) {
130         _log.warn(t);
131     }
132 
133     public void warn(Object msg, Throwable t) {
134         _log.warn(msg, t);
135     }
136 
137     private Log _log;
138 
139 }