码迷,mamicode.com
首页 > 其他好文 > 详细

日志框架实现实时修改,实时生效,具体框架思路(6)

时间:2015-06-23 13:37:54      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:

代码接第(5)章:

/**
* 读取资源信息 <功能详细描述>

* @param filePath
*            资源路径(包含文件名称)
* @return Properties [返回类型说明]
* @see [类、类#方法、类#成员]
*/
private Properties readProperties(String filePath) {
Properties props = new Properties();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(filePath));
props.load(in);
} catch (FileNotFoundException e) {
LOG.error(e.getMessage() + "The config file {0} is not exit");
} catch (IOException e) {
LOG.error(e.getMessage() + "Read config file {0} error");
} finally {
if (null != in) {
try {
in.close();
} catch (IOException e) {
LOG.error(e.getMessage()
+ "Close inputStream of file {0} error ");
}
}
}
return props;
}
}

日志框架实现实时修改,实时生效,具体框架思路(6)

标签:

原文地址:http://blog.csdn.net/liuzhixiong1992/article/details/46604195

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!