View Javadoc

1   /**
2    * Copyright (C) 2010-2012 Joerg Bellmann <joerg.bellmann@googlemail.com>
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  package com.googlecode.t7mp;
17  
18  import org.apache.maven.plugin.logging.Log;
19  
20  public class MavenPluginLog implements PluginLog {
21  
22      private final Log realLog;
23  
24      public MavenPluginLog(Log realLog) {
25          this.realLog = realLog;
26      }
27  
28      @Override
29      public String formatMessage(CharSequence message) {
30          return message.toString();
31      }
32  
33      @Override
34      public void debug(CharSequence message) {
35          realLog.debug(message);
36      }
37  
38      @Override
39      public void debug(Throwable cause) {
40          realLog.debug(cause);
41      }
42  
43      @Override
44      public void debug(CharSequence message, Throwable cause) {
45          realLog.debug(message, cause);
46  
47      }
48  
49      @Override
50      public void error(CharSequence message) {
51          realLog.error(message);
52      }
53  
54      @Override
55      public void error(Throwable cause) {
56          realLog.error(cause);
57      }
58  
59      @Override
60      public void error(CharSequence message, Throwable cause) {
61          realLog.error(message, cause);
62      }
63  
64      @Override
65      public void info(CharSequence message) {
66          realLog.info(message);
67      }
68  
69      @Override
70      public void info(Throwable cause) {
71          realLog.info(cause);
72      }
73  
74      @Override
75      public void info(CharSequence message, Throwable cause) {
76          realLog.info(message, cause);
77      }
78  
79      @Override
80      public boolean isDebugEnabled() {
81          return realLog.isDebugEnabled();
82      }
83  
84      @Override
85      public boolean isErrorEnabled() {
86          return realLog.isErrorEnabled();
87      }
88  
89      @Override
90      public boolean isInfoEnabled() {
91          return realLog.isInfoEnabled();
92      }
93  
94      @Override
95      public boolean isWarnEnabled() {
96          return realLog.isWarnEnabled();
97      }
98  
99      @Override
100     public void warn(CharSequence message) {
101         realLog.warn(message);
102     }
103 
104     @Override
105     public void warn(Throwable cause) {
106         realLog.warn(cause);
107     }
108 
109     @Override
110     public void warn(CharSequence message, Throwable cause) {
111         realLog.warn(message, cause);
112     }
113 
114 }