52 lines
998 B
Java
52 lines
998 B
Java
package com.zhgd.config;
|
|
|
|
import com.zhgd.xmgl.util.LogMdcUtil;
|
|
import org.apache.ibatis.logging.Log;
|
|
|
|
public class StdOutImplCustom implements Log {
|
|
|
|
public StdOutImplCustom(String clazz) {
|
|
// Do Nothing
|
|
}
|
|
|
|
@Override
|
|
public boolean isDebugEnabled() {
|
|
return LogMdcUtil.isPrint();
|
|
}
|
|
|
|
@Override
|
|
public boolean isTraceEnabled() {
|
|
return LogMdcUtil.isPrint();
|
|
}
|
|
|
|
@Override
|
|
public void error(String s, Throwable e) {
|
|
System.err.println(s);
|
|
e.printStackTrace(System.err);
|
|
}
|
|
|
|
@Override
|
|
public void error(String s) {
|
|
System.err.println(s);
|
|
}
|
|
|
|
@Override
|
|
public void debug(String s) {
|
|
if (LogMdcUtil.isPrint()) {
|
|
System.out.println(s);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void trace(String s) {
|
|
if (LogMdcUtil.isPrint()) {
|
|
System.out.println(s);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void warn(String s) {
|
|
System.out.println(s);
|
|
}
|
|
}
|