1 16 package org.directwebremoting.util; 17 18 import org.apache.commons.logging.Log; 19 import org.apache.commons.logging.LogFactory; 20 21 27 public class CommonsLoggingOutput implements LoggingOutput 28 { 29 33 public CommonsLoggingOutput(Class base) 34 { 35 log = LogFactory.getLog(base); 36 } 37 38 41 public void debug(String message) 42 { 43 log.debug(message); 44 } 45 46 49 public void info(String message) 50 { 51 log.info(message); 52 } 53 54 57 public void warn(String message) 58 { 59 log.warn(message); 60 } 61 62 65 public void warn(String message, Throwable th) 66 { 67 log.warn(message, th); 68 } 69 70 73 public void error(String message) 74 { 75 log.error(message); 76 } 77 78 81 public void error(String message, Throwable th) 82 { 83 log.error(message, th); 84 } 85 86 89 public void fatal(String message) 90 { 91 log.fatal(message); 92 } 93 94 97 public void fatal(String message, Throwable th) 98 { 99 log.fatal(message, th); 100 } 101 102 105 public boolean isDebugEnabled() 106 { 107 return log.isDebugEnabled(); 108 } 109 110 private final Log log; 111 } 112 | Popular Tags |