zoukankan      html  css  js  c++  java
  • paip.Log4j配置不起作用的解决

    paip.Log4j配置不起作用的解决


    1.jar包里的log4j配置
    看累挂jar,真的有个" webservices-rt.jarcomsunorgapachexmlinternalsecurity esourcelog4j.properties"
    不个他删除孪,三,韩式中个..


    2.loggger看四不四 import org.apache.log4j.Logger;
    可以import 的是commonloging的jar..

    三,真的是这个原因..


    3.项目里面也许有log4j.xml,这个的优先级比property的高
    删除或者reset cfg
    //        core.logger.info("xxx");
    //        org.apache.log4j.LogManager.resetConfiguration();
    //        org.apache.log4j.PropertyConfigurator
    //                .configure("D:\workspace\imServer\src\log4j.properties");
    //        core.logger("xxxt");
    //
    //        // (2)重新设置属性
    //
    //        Properties log4jCfg = log4jloadAgain.getLog4jProperties();
    //
    //        PropertyConfigurator.configure(log4jCfg);
    //
    //        core.logger.info("xxxt3");
    //        log.info("xx4");
            core.logger.info("xx");

    作者Attilax  艾龙, EMAIL:1466519819@qq.com
    来源:attilax的专栏
    地址:http://blog.csdn.net/attilax


    参考
    依赖jar包里的log4j配置将自己应用的log4j.properties屏蔽掉的问题.htm
  • 相关阅读:
    linux磁盘挂载
    3个方法解决百度网盘限速 (2018-07-20)
    mysql状态分析之show global status
    Cgroups子系统介绍
    Go语言 关键字:defer
    Go语言 map的实现
    Go语言 基本类型
    MySQL 监控指标
    sshpass的使用方法
    C++11 std::ref使用场景
  • 原文地址:https://www.cnblogs.com/attilax/p/5964054.html
Copyright © 2011-2022 走看看