log4j 2 - configuration issue

前端 未结 12 794
执笔经年
执笔经年 2020-12-10 12:34

I am trying to configure log4j 2.0 to report logs.

My config is saved as log4j2.xml and this is its content:

  

        
12条回答
  •  难免孤独
    2020-12-10 12:55

    I also faced the same problem.I kept my log4j2.xml file in System environment variable.

    Variable name : sys_logroot Variable value : D:\user\gouse

    and no logs are created for me.

    use the system variable-Dlog4j.configurationFile=path/to/log4j2.xmlSee here

    This solve my problem

提交回复
热议问题