1 package org.apache.maven.doxia.tools;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.doxia.logging.Log;
23
24
25
26
27
28
29
30
31 public class MojoLogWrapper
32 implements Log
33 {
34 private final org.apache.maven.plugin.logging.Log mojoLog;
35
36
37
38
39 public MojoLogWrapper( org.apache.maven.plugin.logging.Log log )
40 {
41 this.mojoLog = log;
42 }
43
44
45 public void setLogLevel( int level )
46 {
47
48 }
49
50
51 public void debug( CharSequence content )
52 {
53 mojoLog.debug( toString( content ) );
54 }
55
56
57 public void debug( CharSequence content, Throwable error )
58 {
59 mojoLog.debug( toString( content ), error );
60 }
61
62
63 public void debug( Throwable error )
64 {
65 mojoLog.debug( "", error );
66 }
67
68
69 public void info( CharSequence content )
70 {
71 mojoLog.info( toString( content ) );
72 }
73
74
75 public void info( CharSequence content, Throwable error )
76 {
77 mojoLog.info( toString( content ), error );
78 }
79
80
81 public void info( Throwable error )
82 {
83 mojoLog.info( "", error );
84 }
85
86
87 public void warn( CharSequence content )
88 {
89 mojoLog.warn( toString( content ) );
90 }
91
92
93 public void warn( CharSequence content, Throwable error )
94 {
95 mojoLog.warn( toString( content ), error );
96 }
97
98
99 public void warn( Throwable error )
100 {
101 mojoLog.warn( "", error );
102 }
103
104
105 public void error( CharSequence content )
106 {
107 mojoLog.error( toString( content ) );
108 }
109
110
111 public void error( CharSequence content, Throwable error )
112 {
113 mojoLog.error( toString( content ), error );
114 }
115
116
117 public void error( Throwable error )
118 {
119 mojoLog.error( "", error );
120 }
121
122
123 public boolean isDebugEnabled()
124 {
125 return mojoLog.isDebugEnabled();
126 }
127
128
129 public boolean isInfoEnabled()
130 {
131 return mojoLog.isInfoEnabled();
132 }
133
134
135 public boolean isWarnEnabled()
136 {
137 return mojoLog.isWarnEnabled();
138 }
139
140
141 public boolean isErrorEnabled()
142 {
143 return mojoLog.isErrorEnabled();
144 }
145
146
147
148
149
150 private String toString( CharSequence content )
151 {
152 if ( content == null )
153 {
154 return "";
155 }
156
157 return content.toString();
158 }
159 }