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