FreedomLogger.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:erp 作者:
public static Logger getLogger(final Class<?> cl, final String initFile, final String property) {

        Properties properties;
        Logger c = null;
        try {
            ManagerIni mi = initFile != null ? ManagerIni.createManagerIniFile(initFile) : ManagerIni.createManagerIniParameter();
            properties = mi.getSession("FreedomLogger");
            c = Logger.getLogger(cl.getCanonicalName(), myFactory);
            Layout layout = new PatternLayout(LAYOUT_DEFAULT);
            c.addAppender(new FileAppender(layout, properties.get(property).toString(), true));
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return c;
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号