1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.plugins.dependency.utils;
20
21 import org.apache.maven.plugin.logging.Log;
22
23 /**
24 * This logger implements both types of logs currently in use and turns off logs.
25 *
26 * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
27 */
28 public class DependencySilentLog implements Log {
29 /**
30 * @return <code>false</code>
31 * @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
32 */
33 @Override
34 public boolean isDebugEnabled() {
35 return false;
36 }
37
38 /**
39 * By default, do nothing.
40 *
41 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence)
42 */
43 @Override
44 public void debug(CharSequence content) {
45 // nop
46 }
47
48 /**
49 * By default, do nothing.
50 *
51 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable)
52 */
53 @Override
54 public void debug(CharSequence content, Throwable error) {
55 // nop
56 }
57
58 /**
59 * By default, do nothing.
60 *
61 * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable)
62 */
63 @Override
64 public void debug(Throwable error) {
65 // nop
66 }
67
68 /**
69 * @return <code>false</code>
70 * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
71 */
72 @Override
73 public boolean isInfoEnabled() {
74 return false;
75 }
76
77 /**
78 * By default, do nothing.
79 *
80 * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence)
81 */
82 @Override
83 public void info(CharSequence content) {
84 // nop
85 }
86
87 /**
88 * By default, do nothing.
89 *
90 * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable)
91 */
92 @Override
93 public void info(CharSequence content, Throwable error) {
94 // nop
95 }
96
97 /**
98 * By default, do nothing.
99 *
100 * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable)
101 */
102 @Override
103 public void info(Throwable error) {
104 // nop
105 }
106
107 /**
108 * By default, do nothing.
109 *
110 * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
111 */
112 @Override
113 public boolean isWarnEnabled() {
114 // nop
115 return false;
116 }
117
118 /**
119 * By default, do nothing.
120 *
121 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence)
122 */
123 @Override
124 public void warn(CharSequence content) {
125 // nop
126 }
127
128 /**
129 * By default, do nothing.
130 *
131 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable)
132 */
133 @Override
134 public void warn(CharSequence content, Throwable error) {
135 // nop
136 }
137
138 /**
139 * By default, do nothing.
140 *
141 * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable)
142 */
143 @Override
144 public void warn(Throwable error) {
145 // nop
146 }
147
148 /**
149 * @return <code>false</code>
150 * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
151 */
152 @Override
153 public boolean isErrorEnabled() {
154 return false;
155 }
156
157 /**
158 * By default, do nothing.
159 *
160 * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence)
161 */
162 @Override
163 public void error(CharSequence content) {
164 // nop
165 }
166
167 /**
168 * By default, do nothing.
169 *
170 * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable)
171 */
172 @Override
173 public void error(CharSequence content, Throwable error) {
174 // nop
175 }
176
177 /**
178 * By default, do nothing.
179 *
180 * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
181 */
182 @Override
183 public void error(Throwable error) {
184 // nop
185 }
186 }