1 package org.apache.maven.scm.log;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 @Deprecated
26 public class DefaultLog
27 implements ScmLogger
28 {
29
30 private boolean debug = false;
31
32 public DefaultLog()
33 {
34
35 }
36
37 public DefaultLog( boolean debug )
38 {
39 this.debug = debug;
40 }
41
42
43
44
45 public boolean isDebugEnabled()
46 {
47 return this.debug;
48 }
49
50
51
52
53 public void debug( String content )
54 {
55 if ( this.debug )
56 {
57 System.out.println( content );
58 }
59 }
60
61
62
63
64 public void debug( String content, Throwable error )
65 {
66 if ( this.debug )
67 {
68 System.out.println( content );
69 error.printStackTrace();
70 }
71 }
72
73
74
75
76 public void debug( Throwable error )
77 {
78 if ( this.debug )
79 {
80 error.printStackTrace();
81 }
82 }
83
84
85
86
87 public boolean isInfoEnabled()
88 {
89 return true;
90 }
91
92
93
94
95 public void info( String content )
96 {
97 System.out.println( content );
98 }
99
100
101
102
103 public void info( String content, Throwable error )
104 {
105 System.out.println( content );
106 error.printStackTrace();
107 }
108
109
110
111
112 public void info( Throwable error )
113 {
114 error.printStackTrace();
115 }
116
117
118
119
120 public boolean isWarnEnabled()
121 {
122 return true;
123 }
124
125
126
127
128 public void warn( String content )
129 {
130 System.out.println( content );
131 }
132
133
134
135
136 public void warn( String content, Throwable error )
137 {
138 System.out.println( content );
139 error.printStackTrace();
140 }
141
142
143
144
145 public void warn( Throwable error )
146 {
147 error.printStackTrace();
148 }
149
150
151
152
153 public boolean isErrorEnabled()
154 {
155 return true;
156 }
157
158
159
160
161 public void error( String content )
162 {
163 System.out.print( "[ERROR] " + content );
164 }
165
166
167
168
169 public void error( String content, Throwable error )
170 {
171 System.out.println( "[ERROR] " + content );
172 error.printStackTrace();
173 }
174
175
176
177
178 public void error( Throwable error )
179 {
180 error.printStackTrace();
181 }
182 }