wild84
wild84
2017-10-13 07:38

log4j配置在本地正常在服务器异常

  • 发布
  • 服务器
  • 异常
  • log4j

我的配置文件如下:

 log4j.rootLogger = debug,stdout,D,E 
### append info to console ### 
log4j.appender.stdout = org.apache.log4j.ConsoleAppender 
log4j.appender.stdout.Target = System.out 
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout 
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH\:mm\:ss,SSS} method\:%l%n%m%n 
### append debug after=E://logs/log.log ### 
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender 
log4j.appender.D.File = logs/log.log 
log4j.appender.D.Encoding=utf-8
log4j.appender.D.Append = true 
log4j.appender.D.Threshold = DEBUG 
log4j.appender.D.layout = org.apache.log4j.PatternLayout 
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH\:mm\:ss} [ %t\:%r ] - [ %p ] %m%n 
### append error after=E://logs/error.log ### 
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender 
log4j.appender.E.File =logs/error.log 
log4j.appender.E.Encoding=utf-8
log4j.appender.E.Append = true 
log4j.appender.E.Threshold = ERROR 
log4j.appender.E.layout = org.apache.log4j.PatternLayout 
log4j.appender.E.layout.ConversionPattern =%-d{yyyy-MM-dd HH\:mm\:ss} [ %t\:%r ] - [ %p ] %m%n

在本地运行,看到项目文件夹下有logs文件夹,但是发布到服务器之后就没有了.请问哪里设置不对?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐