View Javadoc
1 package org.jadetower.dao.impl; 2 3 /* 4 Copyright (c) 2003, J Aaron Farr 5 All rights reserved. 6 7 This software is published under the terms of the JadeTower Software License, 8 a BSD derived license, a copy of which has been included with this 9 distribution in the LICENSE file. <http://www.jadetower.org> 10 */ 11 12 13 import org.apache.commons.logging.Log; 14 import org.apache.commons.logging.LogFactory; 15 import org.apache.avalon.framework.logger.Logger; 16 17 18 /*** 19 * simple wrapper for jakarta commons log to avalon logging 20 */ 21 public class CommonsLogger 22 implements Logger 23 { 24 25 Log m_log; 26 27 public CommonsLogger(Log log) 28 { 29 m_log = log; 30 } 31 32 public void debug(String string) 33 { 34 m_log.debug(string); 35 } 36 37 public void debug(String string, Throwable throwable) 38 { 39 m_log.debug(string,throwable); 40 } 41 42 public boolean isDebugEnabled() { 43 return m_log.isDebugEnabled(); 44 } 45 46 public void info(String string) { 47 m_log.info(string); 48 } 49 50 public void info(String string, Throwable throwable) { 51 m_log.info(string,throwable); 52 } 53 54 public boolean isInfoEnabled() { 55 return m_log.isInfoEnabled(); 56 } 57 58 public void warn(String string) { 59 m_log.warn(string); 60 } 61 62 public void warn(String string, Throwable throwable) { 63 m_log.warn(string,throwable); 64 } 65 66 public boolean isWarnEnabled() { 67 return m_log.isWarnEnabled(); 68 } 69 70 public void error(String string) { 71 m_log.error(string); 72 } 73 74 public void error(String string, Throwable throwable) { 75 m_log.error(string,throwable); 76 } 77 78 public boolean isErrorEnabled() { 79 return m_log.isErrorEnabled(); 80 } 81 82 public void fatalError(String string) { 83 m_log.fatal(string); 84 } 85 86 public void fatalError(String string, Throwable throwable) { 87 m_log.fatal(string,throwable); 88 } 89 90 public boolean isFatalErrorEnabled() { 91 return m_log.isFatalEnabled(); 92 } 93 94 public Logger getChildLogger(String string) { 95 return new CommonsLogger(LogFactory.getLog(string)); 96 } 97 }

This page was automatically generated by Maven