ScoreboardStats.java 文件源码

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

项目:ScoreboardStats 作者:
private static Logger createLoggerFromJDK(java.util.logging.Logger parent) {
    try {
        parent.setLevel(Level.ALL);

        Class<JDK14LoggerAdapter> adapterClass = JDK14LoggerAdapter.class;
        Constructor<JDK14LoggerAdapter> cons = adapterClass.getDeclaredConstructor(java.util.logging.Logger.class);
        cons.setAccessible(true);
        return cons.newInstance(parent);
    } catch (ReflectiveOperationException reflectEx) {
        parent.log(Level.WARNING, "Cannot create slf4j logging adapter", reflectEx);
        parent.log(Level.WARNING, "Creating logger instance manually...");
        return LoggerFactory.getLogger(parent.getName());
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号