1 23 24 29 30 package com.sun.jdo.spi.persistence.utility.logging; 31 32 import java.io.PrintStream ; 33 34 45 public class LoggerJDK13 extends AbstractLogger 46 { 47 private static final PrintStream _printStream = System.out; 48 49 56 public LoggerJDK13 (String loggerName, String bundleName, 57 ClassLoader loader) 58 { 59 super(loggerName, bundleName, loader); 60 } 61 62 private static PrintStream getPrintStream () { return _printStream; } 63 64 76 public synchronized void log (int level, String msg, Throwable thrown) 77 { 78 if (isLoggable(level)) 79 { 80 logInternal(level, getMessage(msg)); 81 thrown.printStackTrace(getPrintStream()); 82 } 83 } 84 85 93 protected synchronized void logInternal (int level, String message) 94 { 95 getPrintStream().println(getMessageWithPrefix(level, message)); 96 } 97 } 98 | Popular Tags |