A direct NOP (no operation) implementation of Logger. @author Ceki Gülcü
| 33 | * @author Ceki Gülcü |
| 34 | */ |
| 35 | public class NOPLogger extends NamedLoggerBase implements Logger { |
| 36 | |
| 37 | private static final long serialVersionUID = -517220405410904473L; |
| 38 | |
| 39 | /** |
| 40 | * The unique instance of NOPLogger. |
| 41 | */ |
| 42 | public static final NOPLogger NOP_LOGGER = new NOPLogger(); |
| 43 | |
| 44 | /** |
| 45 | * There is no point in creating multiple instances of NOPLogger. |
| 46 | * |
| 47 | * The present constructor should be "private" but we are leaving it as "protected" for compatibility. |
| 48 | */ |
| 49 | protected NOPLogger() { |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Always returns the string value "NOP". |
| 54 | */ |
| 55 | @Override |
| 56 | public String getName() { |
| 57 | return "NOP"; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Always returns false. |
| 62 | * @return always false |
| 63 | */ |
| 64 | @Override |
| 65 | final public boolean isTraceEnabled() { |
| 66 | return false; |
| 67 | } |
| 68 | |
| 69 | /** A NOP implementation. */ |
| 70 | @Override |
| 71 | final public void trace(String msg) { |
| 72 | // NOP |
| 73 | } |
| 74 | |
| 75 | /** A NOP implementation. */ |
| 76 | @Override |
| 77 | final public void trace(String format, Object arg) { |
| 78 | // NOP |
| 79 | } |
| 80 | |
| 81 | /** A NOP implementation. */ |
| 82 | @Override |
| 83 | public final void trace(String format, Object arg1, Object arg2) { |
| 84 | // NOP |
| 85 | } |
| 86 | |
| 87 | /** A NOP implementation. */ |
| 88 | @Override |
| 89 | public final void trace(String format, Object... argArray) { |
| 90 | // NOP |
| 91 | } |
| 92 |
nothing calls this directly
no outgoing calls
no test coverage detected