1 28 29 package org.apache.commons.transaction.util; 30 31 import java.util.logging.Level ; 32 import java.util.logging.Logger ; 33 34 39 public class Jdk14Logger implements LoggerFacade { 40 41 protected Logger logger; 42 43 public Jdk14Logger(Logger logger) { 44 this.logger = logger; 45 } 46 47 public Logger getLogger() { 48 return logger; 49 } 50 51 public LoggerFacade createLogger(String name) { 52 return new Jdk14Logger(Logger.getLogger(name)); 53 } 54 55 public void logInfo(String message) { 56 logger.info(message); 57 } 58 59 public void logFine(String message) { 60 logger.fine(message); 61 } 62 63 public boolean isFineEnabled() { 64 return logger.isLoggable(Level.FINE); 65 } 66 67 public void logFiner(String message) { 68 logger.finer(message); 69 } 70 71 public boolean isFinerEnabled() { 72 return logger.isLoggable(Level.FINER); 73 } 74 75 public void logFinest(String message) { 76 logger.finest(message); 77 } 78 79 public boolean isFinestEnabled() { 80 return logger.isLoggable(Level.FINEST); 81 } 82 83 public void logWarning(String message) { 84 logger.warning(message); 85 } 86 87 public void logWarning(String message, Throwable t) { 88 logger.log(Level.WARNING, message, t); 89 } 90 91 public void logSevere(String message) { 92 logger.severe(message); 93 } 94 95 public void logSevere(String message, Throwable t) { 96 logger.log(Level.SEVERE, message, t); 97 } 98 99 } 100 | Popular Tags |