1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.log4j.spi;
18
19 import org.apache.log4j.Appender;
20 import org.apache.log4j.Level;
21 import org.apache.log4j.Logger;
22 import org.apache.log4j.Priority;
23
24 import java.util.Enumeration;
25 import java.util.ResourceBundle;
26 import java.util.Vector;
27
28
29
30
31
32 public final class NOPLogger extends Logger {
33
34
35
36
37
38 public NOPLogger(NOPLoggerRepository repo, final String name) {
39 super(name);
40 this.repository = repo;
41 this.level = Level.OFF;
42 this.parent = this;
43 }
44
45
46 public void addAppender(final Appender newAppender) {
47 }
48
49
50 public void assertLog(final boolean assertion, final String msg) {
51 }
52
53
54
55 public void callAppenders(final LoggingEvent event) {
56 }
57
58
59 void closeNestedAppenders() {
60 }
61
62
63 public void debug(final Object message) {
64 }
65
66
67
68 public void debug(final Object message, final Throwable t) {
69 }
70
71
72 public void error(final Object message) {
73 }
74
75
76 public void error(final Object message, final Throwable t) {
77 }
78
79
80
81 public void fatal(final Object message) {
82 }
83
84
85 public void fatal(final Object message, final Throwable t) {
86 }
87
88
89
90 public Enumeration getAllAppenders() {
91 return new Vector().elements();
92 }
93
94
95 public Appender getAppender(final String name) {
96 return null;
97 }
98
99
100 public Level getEffectiveLevel() {
101 return Level.OFF;
102 }
103
104
105 public Priority getChainedPriority() {
106 return getEffectiveLevel();
107 }
108
109
110 public ResourceBundle getResourceBundle() {
111 return null;
112 }
113
114
115
116 public void info(final Object message) {
117 }
118
119
120 public void info(final Object message, final Throwable t) {
121 }
122
123
124 public boolean isAttached(Appender appender) {
125 return false;
126 }
127
128
129 public boolean isDebugEnabled() {
130 return false;
131 }
132
133
134 public boolean isEnabledFor(final Priority level) {
135 return false;
136 }
137
138
139 public boolean isInfoEnabled() {
140 return false;
141 }
142
143
144
145 public void l7dlog(final Priority priority, final String key, final Throwable t) {
146 }
147
148
149 public void l7dlog(final Priority priority, final String key, final Object[] params, final Throwable t) {
150 }
151
152
153 public void log(final Priority priority, final Object message, final Throwable t) {
154 }
155
156
157 public void log(final Priority priority, final Object message) {
158 }
159
160
161 public void log(final String callerFQCN, final Priority level, final Object message, final Throwable t) {
162 }
163
164
165 public void removeAllAppenders() {
166 }
167
168
169
170 public void removeAppender(Appender appender) {
171 }
172
173
174 public void removeAppender(final String name) {
175 }
176
177
178 public void setLevel(final Level level) {
179 }
180
181
182
183 public void setPriority(final Priority priority) {
184 }
185
186
187 public void setResourceBundle(final ResourceBundle bundle) {
188 }
189
190
191 public void warn(final Object message) {
192 }
193
194
195 public void warn(final Object message, final Throwable t) {
196 }
197
198
199 public void trace(Object message) {
200 }
201
202
203 public void trace(Object message, Throwable t) {
204 }
205
206
207 public boolean isTraceEnabled() {
208 return false;
209 }
210
211
212 }