|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| LoggingServiceImpl.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 |
/**
|
|
| 2 |
* JFoxSOAF, Service-Oriented Application Framework
|
|
| 3 |
*
|
|
| 4 |
* Copyright (C) www.huihoo.org
|
|
| 5 |
*
|
|
| 6 |
* Distributable under GNU LGPL
|
|
| 7 |
*
|
|
| 8 |
* For more information, please visit: http://www.huihoo.org/jfox/jfoxsoaf
|
|
| 9 |
*/
|
|
| 10 |
|
|
| 11 |
package org.huihoo.jfox.soaf.services.logging;
|
|
| 12 |
|
|
| 13 |
import org.apache.commons.logging.Log;
|
|
| 14 |
import org.apache.commons.logging.LogFactory;
|
|
| 15 |
|
|
| 16 |
/**
|
|
| 17 |
* <p>
|
|
| 18 |
* LoggingService Implemenation.
|
|
| 19 |
* </p>
|
|
| 20 |
*
|
|
| 21 |
* @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng</a>
|
|
| 22 |
* @version $Revision: 1.3 $ $Date: 2004/10/13 11:00:54 $
|
|
| 23 |
* @since 1.0
|
|
| 24 |
*/
|
|
| 25 |
|
|
| 26 |
public class LoggingServiceImpl implements LoggingService { |
|
| 27 |
|
|
| 28 |
private final Log logger = LogFactory.getLog(getClass());
|
|
| 29 |
|
|
| 30 |
/**
|
|
| 31 |
* @see com.neusoft.jaf.services.logging.LogService#isDebugEnabled()
|
|
| 32 |
*/
|
|
| 33 | 1 |
public boolean isDebugEnabled() { |
| 34 | 1 |
return logger.isDebugEnabled();
|
| 35 |
} |
|
| 36 |
|
|
| 37 |
/**
|
|
| 38 |
* @see com.neusoft.jaf.services.logging.LogService#isErrorEnabled()
|
|
| 39 |
*/
|
|
| 40 | 1 |
public boolean isErrorEnabled() { |
| 41 | 1 |
return logger.isErrorEnabled();
|
| 42 |
} |
|
| 43 |
|
|
| 44 |
/**
|
|
| 45 |
* @see com.neusoft.jaf.services.logging.LogService#isFatalEnabled()
|
|
| 46 |
*/
|
|
| 47 | 1 |
public boolean isFatalEnabled() { |
| 48 | 1 |
return logger.isFatalEnabled();
|
| 49 |
} |
|
| 50 |
|
|
| 51 |
/**
|
|
| 52 |
* @see com.neusoft.jaf.services.logging.LogService#isInfoEnabled()
|
|
| 53 |
*/
|
|
| 54 | 1 |
public boolean isInfoEnabled() { |
| 55 | 1 |
return logger.isInfoEnabled();
|
| 56 |
} |
|
| 57 |
|
|
| 58 |
/**
|
|
| 59 |
* @see com.neusoft.jaf.services.logging.LogService#isTraceEnabled()
|
|
| 60 |
*/
|
|
| 61 | 1 |
public boolean isTraceEnabled() { |
| 62 | 1 |
return logger.isTraceEnabled();
|
| 63 |
} |
|
| 64 |
|
|
| 65 |
/**
|
|
| 66 |
* @see com.neusoft.jaf.services.logging.LogService#isWarnEnabled()
|
|
| 67 |
*/
|
|
| 68 | 1 |
public boolean isWarnEnabled() { |
| 69 | 1 |
return logger.isWarnEnabled();
|
| 70 |
} |
|
| 71 |
|
|
| 72 |
/**
|
|
| 73 |
* @see com.neusoft.jaf.services.logging.LogService#trace(Object message)
|
|
| 74 |
*/
|
|
| 75 | 2 |
public void trace(Object message) { |
| 76 | 2 |
logger.trace(message); |
| 77 |
} |
|
| 78 |
|
|
| 79 |
/**
|
|
| 80 |
* @see com.neusoft.jaf.services.logging.LogService#trace(Object message,
|
|
| 81 |
* Throwable t)
|
|
| 82 |
*/
|
|
| 83 | 2 |
public void trace(Object message, Throwable t) { |
| 84 | 2 |
logger.trace(message, t); |
| 85 |
} |
|
| 86 |
|
|
| 87 |
/**
|
|
| 88 |
* @see com.neusoft.jaf.services.logging.LogService#debug(Object message)
|
|
| 89 |
*/
|
|
| 90 | 2 |
public void debug(Object message) { |
| 91 | 2 |
logger.debug(message); |
| 92 |
} |
|
| 93 |
|
|
| 94 |
/**
|
|
| 95 |
* @see com.neusoft.jaf.services.logging.LogService#debug(Object message,
|
|
| 96 |
* Throwable t)
|
|
| 97 |
*/
|
|
| 98 | 2 |
public void debug(Object message, Throwable t) { |
| 99 | 2 |
logger.debug(message, t); |
| 100 |
} |
|
| 101 |
|
|
| 102 |
/**
|
|
| 103 |
* @see com.neusoft.jaf.services.logging.LogService#info(Object message)
|
|
| 104 |
*/
|
|
| 105 | 2 |
public void info(Object message) { |
| 106 | 2 |
logger.info(message); |
| 107 |
} |
|
| 108 |
|
|
| 109 |
/**
|
|
| 110 |
* @see com.neusoft.jaf.services.logging.LogService#info(Object message,
|
|
| 111 |
* Throwable t)
|
|
| 112 |
*/
|
|
| 113 | 2 |
public void info(Object message, Throwable t) { |
| 114 | 2 |
logger.info(message, t); |
| 115 |
} |
|
| 116 |
|
|
| 117 |
/**
|
|
| 118 |
* @see com.neusoft.jaf.services.logging.LogService#info(Object message)
|
|
| 119 |
*/
|
|
| 120 | 2 |
public void warn(Object message) { |
| 121 | 2 |
logger.warn(message); |
| 122 |
} |
|
| 123 |
|
|
| 124 |
/**
|
|
| 125 |
* @see com.neusoft.jaf.services.logging.LogService#info(Object message,
|
|
| 126 |
* Throwable t)
|
|
| 127 |
*/
|
|
| 128 | 2 |
public void warn(Object message, Throwable t) { |
| 129 | 2 |
logger.warn(message, t); |
| 130 |
} |
|
| 131 |
|
|
| 132 |
/**
|
|
| 133 |
* @see com.neusoft.jaf.services.logging.LogService#error(Object message)
|
|
| 134 |
*/
|
|
| 135 | 2 |
public void error(Object message) { |
| 136 | 2 |
logger.error(message); |
| 137 |
} |
|
| 138 |
|
|
| 139 |
/**
|
|
| 140 |
* @see com.neusoft.jaf.services.logging.LogService#error(Object message,
|
|
| 141 |
* Throwable t)
|
|
| 142 |
*/
|
|
| 143 | 2 |
public void error(Object message, Throwable t) { |
| 144 | 2 |
logger.error(message, t); |
| 145 |
} |
|
| 146 |
|
|
| 147 |
/**
|
|
| 148 |
* @see com.neusoft.jaf.services.logging.LogService#fatal(Object message)
|
|
| 149 |
*/
|
|
| 150 | 2 |
public void fatal(Object message) { |
| 151 | 2 |
logger.fatal(message); |
| 152 |
} |
|
| 153 |
|
|
| 154 |
/**
|
|
| 155 |
* @see com.neusoft.jaf.services.logging.LogService#fatal(Object message,
|
|
| 156 |
* Throwable t)
|
|
| 157 |
*/
|
|
| 158 | 2 |
public void fatal(Object message, Throwable t) { |
| 159 | 2 |
logger.fatal(message, t); |
| 160 |
} |
|
| 161 |
|
|
| 162 |
} |
|
||||||||||