1 package org.apache.maven.monitor.logging;
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.plugin.logging.Log;
23 import org.codehaus.plexus.logging.Logger;
24
25
26
27
28 public class DefaultLog
29 implements Log
30 {
31
32 private final Logger logger;
33
34 public DefaultLog( Logger logger )
35 {
36 this.logger = logger;
37 }
38
39 public void debug( CharSequence content )
40 {
41 logger.debug( toString( content ) );
42 }
43
44 private String toString( CharSequence content )
45 {
46 if ( content == null )
47 {
48 return "";
49 }
50 else
51 {
52 return content.toString();
53 }
54 }
55
56 public void debug( CharSequence content, Throwable error )
57 {
58 logger.debug( toString( content ), error );
59 }
60
61 public void debug( Throwable error )
62 {
63 logger.debug( "", error );
64 }
65
66 public void info( CharSequence content )
67 {
68 logger.info( toString( content ) );
69 }
70
71 public void info( CharSequence content, Throwable error )
72 {
73 logger.info( toString( content ), error );
74 }
75
76 public void info( Throwable error )
77 {
78 logger.info( "", error );
79 }
80
81 public void warn( CharSequence content )
82 {
83 logger.warn( toString( content ) );
84 }
85
86 public void warn( CharSequence content, Throwable error )
87 {
88 logger.warn( toString( content ), error );
89 }
90
91 public void warn( Throwable error )
92 {
93 logger.warn( "", error );
94 }
95
96 public void error( CharSequence content )
97 {
98 logger.error( toString( content ) );
99 }
100
101 public void error( CharSequence content, Throwable error )
102 {
103 logger.error( toString( content ), error );
104 }
105
106 public void error( Throwable error )
107 {
108 logger.error( "", error );
109 }
110
111 public boolean isDebugEnabled()
112 {
113 return logger.isDebugEnabled();
114 }
115
116 public boolean isInfoEnabled()
117 {
118 return logger.isInfoEnabled();
119 }
120
121 public boolean isWarnEnabled()
122 {
123 return logger.isWarnEnabled();
124 }
125
126 public boolean isErrorEnabled()
127 {
128 return logger.isErrorEnabled();
129 }
130
131 }