|
|||||||||||||||||||
| 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 | |||||||||||||||
| LogWrapper.java | 0% | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* Joey and its relative products are published under the terms
|
|
| 3 |
* of the Apache Software License.
|
|
| 4 |
*/
|
|
| 5 |
package org.asyrinx.brownie.core.log;
|
|
| 6 |
|
|
| 7 |
import org.apache.commons.logging.Log;
|
|
| 8 |
import org.asyrinx.brownie.core.util.Wrapper;
|
|
| 9 |
|
|
| 10 |
/**
|
|
| 11 |
* <b>概要 </b> Logインタフェースのラッパークラスです。 <br>
|
|
| 12 |
*
|
|
| 13 |
* @author Akima
|
|
| 14 |
*/
|
|
| 15 |
public class LogWrapper extends Wrapper implements Log { |
|
| 16 |
|
|
| 17 |
/**
|
|
| 18 |
* Constructor for LogWrapper.
|
|
| 19 |
*/
|
|
| 20 | 0 |
public LogWrapper(Log impl) {
|
| 21 | 0 |
super(impl);
|
| 22 | 0 |
this.impl = impl;
|
| 23 |
} |
|
| 24 |
|
|
| 25 |
protected final Log impl;
|
|
| 26 |
|
|
| 27 |
/**
|
|
| 28 |
* @see org.apache.commons.logging.Log#isDebugEnabled()
|
|
| 29 |
*/
|
|
| 30 | 0 |
public boolean isDebugEnabled() { |
| 31 | 0 |
return impl.isDebugEnabled();
|
| 32 |
} |
|
| 33 |
|
|
| 34 |
/**
|
|
| 35 |
* @see org.apache.commons.logging.Log#isErrorEnabled()
|
|
| 36 |
*/
|
|
| 37 | 0 |
public boolean isErrorEnabled() { |
| 38 | 0 |
return impl.isErrorEnabled();
|
| 39 |
} |
|
| 40 |
|
|
| 41 |
/**
|
|
| 42 |
* @see org.apache.commons.logging.Log#isFatalEnabled()
|
|
| 43 |
*/
|
|
| 44 | 0 |
public boolean isFatalEnabled() { |
| 45 | 0 |
return impl.isFatalEnabled();
|
| 46 |
} |
|
| 47 |
|
|
| 48 |
/**
|
|
| 49 |
* @see org.apache.commons.logging.Log#isInfoEnabled()
|
|
| 50 |
*/
|
|
| 51 | 0 |
public boolean isInfoEnabled() { |
| 52 | 0 |
return impl.isInfoEnabled();
|
| 53 |
} |
|
| 54 |
|
|
| 55 |
/**
|
|
| 56 |
* @see org.apache.commons.logging.Log#isTraceEnabled()
|
|
| 57 |
*/
|
|
| 58 | 0 |
public boolean isTraceEnabled() { |
| 59 | 0 |
return impl.isTraceEnabled();
|
| 60 |
} |
|
| 61 |
|
|
| 62 |
/**
|
|
| 63 |
* @see org.apache.commons.logging.Log#isWarnEnabled()
|
|
| 64 |
*/
|
|
| 65 | 0 |
public boolean isWarnEnabled() { |
| 66 | 0 |
return impl.isWarnEnabled();
|
| 67 |
} |
|
| 68 |
|
|
| 69 |
/**
|
|
| 70 |
* @see org.asyrinx.log.Logger#log(LogLevel, Object)
|
|
| 71 |
*/
|
|
| 72 | 0 |
public void log(LogLevel level, Object message) { |
| 73 | 0 |
this.log(level, message, null); |
| 74 |
} |
|
| 75 |
|
|
| 76 |
/**
|
|
| 77 |
* @see org.asyrinx.log.Logger#log(LogLevel, Object, Throwable)
|
|
| 78 |
*/
|
|
| 79 | 0 |
public void log(LogLevel level, Object message, Throwable t) { |
| 80 | 0 |
if (impl == null) |
| 81 | 0 |
return;
|
| 82 | 0 |
if (level == null) |
| 83 | 0 |
level = LogLevel.DEBUG; |
| 84 |
//
|
|
| 85 | 0 |
if (level == LogLevel.FATAL)
|
| 86 | 0 |
impl.fatal(message, t); |
| 87 | 0 |
else if (level == LogLevel.ERROR) |
| 88 | 0 |
impl.error(message, t); |
| 89 | 0 |
else if (level == LogLevel.WARN) |
| 90 | 0 |
impl.warn(message, t); |
| 91 | 0 |
else if (level == LogLevel.INFO) |
| 92 | 0 |
impl.info(message, t); |
| 93 | 0 |
else if (level == LogLevel.DEBUG) |
| 94 | 0 |
impl.debug(message, t); |
| 95 | 0 |
else if (level == LogLevel.TRACE) |
| 96 | 0 |
impl.trace(message, t); |
| 97 |
} |
|
| 98 |
|
|
| 99 |
/**
|
|
| 100 |
* @see org.apache.commons.logging.Log#trace(Object)
|
|
| 101 |
*/
|
|
| 102 | 0 |
public void trace(Object message) { |
| 103 | 0 |
impl.trace(message); |
| 104 |
} |
|
| 105 |
|
|
| 106 |
/**
|
|
| 107 |
* @see org.apache.commons.logging.Log#trace(Object, Throwable)
|
|
| 108 |
*/
|
|
| 109 | 0 |
public void trace(Object message, Throwable t) { |
| 110 | 0 |
impl.trace(message, t); |
| 111 |
} |
|
| 112 |
|
|
| 113 |
/**
|
|
| 114 |
* @see org.apache.commons.logging.Log#debug(Object)
|
|
| 115 |
*/
|
|
| 116 | 0 |
public void debug(Object message) { |
| 117 | 0 |
impl.debug(message); |
| 118 |
} |
|
| 119 |
|
|
| 120 |
/**
|
|
| 121 |
* @see org.apache.commons.logging.Log#debug(Object, Throwable)
|
|
| 122 |
*/
|
|
| 123 | 0 |
public void debug(Object message, Throwable t) { |
| 124 | 0 |
impl.debug(message, t); |
| 125 |
} |
|
| 126 |
|
|
| 127 |
/**
|
|
| 128 |
* @see org.apache.commons.logging.Log#info(Object)
|
|
| 129 |
*/
|
|
| 130 | 0 |
public void info(Object message) { |
| 131 | 0 |
impl.info(message); |
| 132 |
} |
|
| 133 |
|
|
| 134 |
/**
|
|
| 135 |
* @see org.apache.commons.logging.Log#info(Object, Throwable)
|
|
| 136 |
*/
|
|
| 137 | 0 |
public void info(Object message, Throwable t) { |
| 138 | 0 |
impl.info(message, t); |
| 139 |
} |
|
| 140 |
|
|
| 141 |
/**
|
|
| 142 |
* @see org.apache.commons.logging.Log#warn(Object)
|
|
| 143 |
*/
|
|
| 144 | 0 |
public void warn(Object message) { |
| 145 | 0 |
impl.warn(message); |
| 146 |
} |
|
| 147 |
|
|
| 148 |
/**
|
|
| 149 |
* @see org.apache.commons.logging.Log#warn(Object, Throwable)
|
|
| 150 |
*/
|
|
| 151 | 0 |
public void warn(Object message, Throwable t) { |
| 152 | 0 |
impl.warn(message, t); |
| 153 |
} |
|
| 154 |
|
|
| 155 |
/**
|
|
| 156 |
* @see org.apache.commons.logging.Log#error(Object)
|
|
| 157 |
*/
|
|
| 158 | 0 |
public void error(Object message) { |
| 159 | 0 |
impl.error(message); |
| 160 |
} |
|
| 161 |
|
|
| 162 |
/**
|
|
| 163 |
* @see org.apache.commons.logging.Log#error(Object, Throwable)
|
|
| 164 |
*/
|
|
| 165 | 0 |
public void error(Object message, Throwable t) { |
| 166 | 0 |
impl.error(message, t); |
| 167 |
} |
|
| 168 |
|
|
| 169 |
/**
|
|
| 170 |
* @see org.apache.commons.logging.Log#fatal(Object)
|
|
| 171 |
*/
|
|
| 172 | 0 |
public void fatal(Object message) { |
| 173 | 0 |
impl.fatal(message); |
| 174 |
} |
|
| 175 |
|
|
| 176 |
/**
|
|
| 177 |
* @see org.apache.commons.logging.Log#fatal(Object, Throwable)
|
|
| 178 |
*/
|
|
| 179 | 0 |
public void fatal(Object message, Throwable t) { |
| 180 | 0 |
impl.fatal(message, t); |
| 181 |
} |
|
| 182 |
|
|
| 183 |
} |
|
||||||||||