1 3 package org.apache.commons.logging.impl; 4 5 import org.apache.commons.logging.Log; 6 import org.slf4j.Logger; 7 8 17 public class SLF4JLog implements Log { 18 19 private Logger logger; 20 21 SLF4JLog(Logger logger) { 22 this.logger = logger; 23 } 24 25 28 public boolean isDebugEnabled() { 29 return logger.isDebugEnabled(); 30 } 31 32 35 public boolean isErrorEnabled() { 36 return logger.isErrorEnabled(); 37 } 38 39 43 public boolean isFatalEnabled() { 44 return logger.isErrorEnabled(); 45 } 46 47 50 public boolean isInfoEnabled() { 51 return logger.isInfoEnabled(); 52 } 53 54 58 public boolean isTraceEnabled() { 59 return logger.isTraceEnabled(); 60 } 61 62 65 public boolean isWarnEnabled() { 66 return logger.isWarnEnabled(); 67 } 68 69 75 public void trace(Object message) { 76 logger.trace(String.valueOf(message)); 77 } 78 79 86 public void trace(Object message, Throwable t) { 87 logger.trace(String.valueOf(message), t); 88 } 89 90 96 public void debug(Object message) { 97 logger.debug(String.valueOf(message)); 98 } 99 100 107 public void debug(Object message, Throwable t) { 108 logger.debug(String.valueOf(message), t); 109 } 110 111 117 public void info(Object message) { 118 logger.info(String.valueOf(message)); 119 } 120 121 128 public void info(Object message, Throwable t) { 129 logger.info(String.valueOf(message), t); 130 } 131 132 138 public void warn(Object message) { 139 logger.warn(String.valueOf(message)); 140 } 141 142 149 public void warn(Object message, Throwable t) { 150 logger.warn(String.valueOf(message), t); 151 } 152 153 159 public void error(Object message) { 160 logger.error(String.valueOf(message)); 161 } 162 163 170 public void error(Object message, Throwable t) { 171 logger.error(String.valueOf(message), t); 172 } 173 174 175 176 182 public void fatal(Object message) { 183 logger.error(String.valueOf(message)); 184 } 185 186 193 public void fatal(Object message, Throwable t) { 194 logger.error(String.valueOf(message), t); 195 } 196 197 } | Popular Tags |