1 23 24 package com.sun.enterprise.util.diagnostics; 25 26 import java.io.*; 27 import java.util.*; 28 import java.util.logging.Logger ; 30 import java.util.logging.Level ; 31 import com.sun.logging.LogDomains; 32 34 38 public class Reporter implements IReporterEnum 39 { 40 static Logger _logger=LogDomains.getLogger(LogDomains.UTIL_LOGGER); 47 49 52 public static ReporterImpl get() 53 { 54 return getDefaultReporter(); 55 } 56 57 59 62 public static void setSeverityLevel(int level) 63 { 64 getDefaultReporter().setSeverityLevel(level); 65 } 66 67 69 73 public static void setSeverityLevel(String level) 74 { 75 getDefaultReporter().setSeverityLevel(level); 76 } 77 78 80 83 public static int getSeverityLevel() 84 { 85 return getDefaultReporter().getSeverityLevel(); 86 } 87 88 90 93 public static String getSeverityLevelString() 94 { 95 return getDefaultReporter().getSeverityLevelString(); 96 } 97 98 104 107 public static void verbose(Object o) 108 { 109 getDefaultReporter().verbose(o); 110 } 111 112 114 117 public static void info(Object o) 118 { 119 getDefaultReporter().info(o); 120 } 121 122 124 127 public static void warn(Object o) 128 { 129 getDefaultReporter().warn(o); 130 } 131 132 134 137 public static void warning(Object o) 138 { 139 getDefaultReporter().warning(o); 140 } 141 142 144 147 public static void error(Object o) 148 { 149 getDefaultReporter().error(o); 150 } 151 152 154 157 public static void critical(Object o) 158 { 159 getDefaultReporter().critical(o); 160 } 161 163 166 public static void crit(Object o) 167 { 168 getDefaultReporter().crit(o); 169 } 170 171 173 177 public static void dump(Object o, String s) 178 { 179 getDefaultReporter().dump(o, s); 180 } 181 182 184 187 public static void dump(String s) 188 { 189 getDefaultReporter().dump(s); 190 } 191 192 193 195 198 public static void dump(Object o) 199 { 200 getDefaultReporter().dump(o); 201 } 202 203 204 210 213 217 public static void insist(String s) 218 { 219 getDefaultReporter().insist(s); 220 } 221 222 224 229 public static void insist(String checkme, String s) 230 { 231 getDefaultReporter().insist(checkme, s); 232 } 233 234 236 239 public static void insist(boolean b) 240 { 241 getDefaultReporter().insist(b); 242 } 243 244 246 249 public static void insist(boolean b, String s) 250 { 251 getDefaultReporter().insist(b, s); 252 } 253 254 256 259 public static void insist(Object o) 260 { 261 getDefaultReporter().insist(o); 262 } 263 264 266 269 public static void insist(Object o, String s) 270 { 271 getDefaultReporter().insist(o, s); 272 } 273 274 276 279 public static void insist(double z) 280 { 281 getDefaultReporter().insist(z); 282 } 283 284 286 289 public static void insist(double z, String s) 290 { 291 getDefaultReporter().insist(z, s); 292 } 293 294 296 299 public static void insist(long l) 300 { 301 getDefaultReporter().insist(l); 302 } 303 304 306 309 public static void insist(long l, String s) 310 { 311 getDefaultReporter().insist(l, s); 312 } 313 314 315 321 protected Reporter() 322 { 323 } 324 325 327 private static void debug(String s) 328 { 329 if(doDebug) 330 _logger.log(Level.WARNING,s); 333 } 335 336 338 private static ReporterImpl getDefaultReporter() 339 { 340 if(defaultReporter == null) 341 { 342 _logger.log(Level.WARNING,"iplanet_util.internal_error"); 345 defaultReporter = new ReporterImpl(); 347 } 348 349 return defaultReporter; 350 } 351 352 354 private static ReporterImpl defaultReporter = null; 355 private static final boolean doDebug = false; 356 357 359 static 360 { 361 CallerInfo.addToGlobalIgnore(new Reporter()); 362 363 defaultReporter = new ReporterImpl(); 364 365 if(defaultReporter == null) 366 { 367 _logger.log(Level.WARNING,"iplanet_util.internal_error"); 370 } 371 } 372 } 373 374 | Popular Tags |