NutzCN Logo
问答 linux error
发布于 2722天前 作者 shuxinyun 1819 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

[INFO] Classes = /home/zrzc/git/shuxin.java/wk-app/wk-web/target/classes
[INFO] Context path = /
[INFO] Tmp directory = /home/zrzc/git/shuxin.java/wk-app/wk-web/target/tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file = file:///home/zrzc/git/shuxin.java/wk-app/wk-web/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = /home/zrzc/git/shuxin.java/wk-app/wk-web/src/main/webapp
[INFO] jetty-9.4.2.v20170220
[INFO] Scanning elapsed time=15411ms
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /logs/nutzwk.log (没有那个文件或目录)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)

4 回复

log4j.properties里面的日志路径改一下

log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=${catalina.base}/logs/nutzwk.log
log4j.appender.file.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%-5p] %d %l - %m%n
zenme xiugai ?

建个目录/home/zrzc/logs ,然后改成 /home/zrzc/logs/nutzwk.log 不就好了?

添加回复
请先登陆
回到顶部