首页 > 其他 > 详细

修改org.slf4j.Logger时,修改默认配置文件位置

时间:2018-08-11 10:05:42      阅读:1321      评论:0      收藏:0      [点我收藏+]
File logbackFile = new File(ConstantsTools.PATH_LOG_CONFIG);
if (logbackFile.exists()) {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(lc);
lc.reset();
try {
configurator.doConfigure(logbackFile);
}
catch (JoranException e) {
e.printStackTrace(System.err);
System.exit(-1);
}
}

修改org.slf4j.Logger时,修改默认配置文件位置

原文:https://www.cnblogs.com/aloneblog/p/9458245.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!