log4j - ERROR setFile(null,false) call failed

created at 12-08-2021 views: 3

error

frank_cui
log4j - ERROR setFile(null,false) call failed
log4j:ERROR setFile(null,false) call failed.

java.io.FileNotFoundException: \logs\test.log (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)

error code

solution

Change 

<paramname="File"value="/logs/test.log"/> 

to 

<paramname="File"value="logs/test.log"/>
created at:12-08-2021
edited at: 12-08-2021: