1 package org.objectweb.kilim; 2 3 import org.objectweb.util.monolog.api.Level; 4 import org.objectweb.util.monolog.api.Logger; 5 import org.objectweb.util.monolog.api.LoggerFactory; 6 7 13 public class NullLoggerFactory implements LoggerFactory { 14 15 private NullLogger null_logger = new NullLogger(); 16 private Logger[] null_loggers = {null_logger}; 17 18 21 public Logger getLogger(String arg0) { 22 return null_logger; 23 } 24 25 28 public Logger getLogger(String arg0, String arg1) { 29 return null_logger; 30 } 31 32 35 public String getResourceBundleName() { 36 return "Null Bundle Name"; 37 } 38 39 42 public void setResourceBundleName(String arg0) { 43 } 44 45 48 public Logger[] getLoggers() { 49 return null_loggers; 50 } 51 52 } 53 54 class NullLogger implements Logger { 55 56 59 public int getCurrentIntLevel() { 60 return 0; 61 } 62 63 66 public Level getCurrentLevel() { 67 return null; 68 } 69 70 73 public boolean isLoggable(int arg0) { 74 return false; 75 } 76 77 80 public boolean isLoggable(Level arg0) { 81 return false; 82 } 83 84 87 public boolean isOn() { 88 return false; 89 } 90 91 94 public void log(int arg0, Object arg1, Object arg2, Object arg3) { 95 } 96 97 100 public void log( 101 int arg0, 102 Object arg1, 103 Throwable arg2, 104 Object arg3, 105 Object arg4) { 106 } 107 108 111 public void log(int arg0, Object arg1, Throwable arg2) { 112 } 113 114 117 public void log(int arg0, Object arg1) { 118 } 119 120 123 public void log(Level arg0, Object arg1, Object arg2, Object arg3) { 124 } 125 126 129 public void log( 130 Level arg0, 131 Object arg1, 132 Throwable arg2, 133 Object arg3, 134 Object arg4) { 135 } 136 137 140 public void log(Level arg0, Object arg1, Throwable arg2) { 141 } 142 143 146 public void log(Level arg0, Object arg1) { 147 } 148 149 152 public void setIntLevel(int arg0) { 153 } 154 155 158 public void setLevel(Level arg0) { 159 } 160 161 164 public void turnOff() { 165 } 166 167 170 public void turnOn() { 171 } 172 173 176 public Object getAttribute(String arg0) { 177 return null; 178 } 179 180 183 public String [] getAttributeNames() { 184 return null; 185 } 186 187 190 public String getName() { 191 return null; 192 } 193 194 197 public byte getType() { 198 return 0; 199 } 200 201 204 public Object setAttribute(String arg0, Object arg1) { 205 return null; 206 } 207 208 211 public void setName(String arg0) { 212 } 213 214 } 215 | Popular Tags |