赞
踩
直接上代码:
CALSS: public class SqlLogImpl implements Log { public static final Logger log = LogManager.getLogger(SqlLogImpl.class); public SqlLogImpl(String clazz) { // Do Nothing } @Override public boolean isDebugEnabled() { // return log.isDebugEnabled(); // 将debug级别输出权限改成info级别 return log.isInfoEnabled(); } @Override public void debug(String s) { // log.debug(s); // debug日志输出成info级别日志 //此处对日志打印的连续17位数字进行替换为“*” log.info(s.replaceAll("\\d{17}", "*")); } ... } spring-boot的XML: mybatis-plus: mapper-locations: - classpath:/**/dao/mapper/**/**.xml configuration: log-impl: **.util.SqlLogImpl
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。