View Javadoc

1   /**
2    * Copyright 2011-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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.dhptech.maven.stripbom;
17  
18  import org.apache.maven.plugin.logging.Log;
19  
20  class StdOutMavenLogger implements Log {
21  
22    public StdOutMavenLogger() {
23    }
24  
25    @Override
26    public boolean isDebugEnabled() {
27      return true;
28    }
29  
30    @Override
31    public void debug(CharSequence content) {
32      System.out.println(content);
33    }
34  
35    @Override
36    public void debug(CharSequence content, Throwable error) {
37      System.out.println(content);
38      error.printStackTrace();
39    }
40  
41    @Override
42    public void debug(Throwable error) {
43      error.printStackTrace();
44    }
45  
46    @Override
47    public boolean isInfoEnabled() {
48      return true;
49    }
50  
51    @Override
52    public void info(CharSequence content) {
53      System.out.println(content);
54    }
55  
56    @Override
57    public void info(CharSequence content, Throwable error) {
58      System.out.println(content);
59      error.printStackTrace();
60    }
61  
62    @Override
63    public void info(Throwable error) {
64      error.printStackTrace();
65    }
66  
67    @Override
68    public boolean isWarnEnabled() {
69      return true;
70    }
71  
72    @Override
73    public void warn(CharSequence content) {
74      System.out.println(content);
75    }
76  
77    @Override
78    public void warn(CharSequence content, Throwable error) {
79      System.out.println(content);
80      error.printStackTrace();
81    }
82  
83    @Override
84    public void warn(Throwable error) {
85      error.printStackTrace();
86    }
87  
88    @Override
89    public boolean isErrorEnabled() {
90      return true;
91    }
92  
93    @Override
94    public void error(CharSequence content) {
95      System.out.println(content);
96    }
97  
98    @Override
99    public void error(CharSequence content, Throwable error) {
100     System.out.println(content);
101     error.printStackTrace();
102   }
103 
104   @Override
105   public void error(Throwable error) {
106     error.printStackTrace();
107   }
108 }