Error: “setFile(null,false) call failed” when using log4j

前端 未结 10 668
感情败类
感情败类 2020-12-15 15:37

I have added log4j.properties file in source folder of project but I am still getting a log4j:error.

Here is my Log4j.properties file:

          


        
10条回答
  •  清歌不尽
    2020-12-15 16:25

    this error is coming because of appender file location you have provided is not reachable with current user access.

    Quick Solution, change the log4j.appender.FILE.File setting to point to file using absolute path which location is reachable to the current user you have logged in, for example /tmp/myapp.log. Now You should not get an error.

提交回复
热议问题