为了账号安全,请及时绑定邮箱和手机立即绑定

求解,为什么我的logback报错

求解,为什么我的logback报错

千万里不及你 2019-05-20 10:35:30
这个是配置文件${log.pattern}${log.filePath}/debug.log${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz${log.maxHistory}INFOACCEPTDENY${log.filePath}/info.log${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz${log.maxHistory}INFOACCEPTDENY${log.filePath}/error.log${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz${log.maxHistory}INFOACCEPTDENY这个是报错日志10:20:48,900|-ERRORinch.qos.logback.core.rolling.RollingFileAppender[debugAppender]-Noencodersetfortheappendernamed"debugAppender".10:20:48,900|-INFOinch.qos.logback.core.joran.action.AppenderAction-Abouttoinstantiateappenderoftype[ch.qos.logback.core.rolling.RollingFileAppender]10:20:48,900|-INFOinch.qos.logback.core.joran.action.AppenderAction-Namingappenderas[infoAppender]10:20:48,900|-INFOinc.q.l.core.rolling.TimeBasedRollingPolicy@905986454-Willusegzcompression10:20:48,900|-INFOinc.q.l.core.rolling.TimeBasedRollingPolicy@905986454-WillusethepatternC:/Users/36537/.IntelliJIdea2019.1/system/tomcat/Unnamed_o2o_3/logs/webapps/info/info.%d{yyyy-MM-dd}.logfortheactivefile10:20:48,900|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-Thedatepatternis'yyyy-MM-dd'fromfilenamepattern'C:/Users/36537/.IntelliJIdea2019.1/system/tomcat/Unnamed_o2o_3/logs/webapps/info/info.%d{yyyy-MM-dd}.log.gz'.10:20:48,900|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-Roll-overatmidnight.10:20:48,900|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-SettinginitialperiodtoFriMay1009:23:22CST201910:20:48,900|-INFOinch.qos.logback.core.rolling.RollingFileAppender[infoAppender]-Activelogfilename:C:Users36537.IntelliJIdea2019.1systemtomcatUnnamed_o2o_3/logs/webapps/info.log10:20:48,900|-INFOinch.qos.logback.core.rolling.RollingFileAppender[infoAppender]-Filepropertyissetto[C:Users36537.IntelliJIdea2019.1systemtomcatUnnamed_o2o_3/logs/webapps/info.log]10:20:48,900|-WARNinch.qos.logback.core.rolling.RollingFileAppender[infoAppender]-Encoderhasnotbeenset.Cannotinvokeitsinitmethod.10:20:48,900|-ERRORinch.qos.logback.core.rolling.RollingFileAppender[infoAppender]-Noencodersetfortheappendernamed"infoAppender".10:20:48,900|-INFOinch.qos.logback.core.joran.action.AppenderAction-Abouttoinstantiateappenderoftype[ch.qos.logback.core.rolling.RollingFileAppender]10:20:48,900|-INFOinch.qos.logback.core.joran.action.AppenderAction-Namingappenderas[errorAppender]10:20:48,900|-INFOinc.q.l.core.rolling.TimeBasedRollingPolicy@1482593465-Willusegzcompression10:20:48,900|-INFOinc.q.l.core.rolling.TimeBasedRollingPolicy@1482593465-WillusethepatternC:/Users/36537/.IntelliJIdea2019.1/system/tomcat/Unnamed_o2o_3/logs/webapps/error/error.%d{yyyy-MM-dd}.logfortheactivefile10:20:48,903|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-Thedatepatternis'yyyy-MM-dd'fromfilenamepattern'C:/Users/36537/.IntelliJIdea2019.1/system/tomcat/Unnamed_o2o_3/logs/webapps/error/error.%d{yyyy-MM-dd}.log.gz'.10:20:48,903|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-Roll-overatmidnight.10:20:48,903|-INFOinc.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy-SettinginitialperiodtoFriMay1009:23:22CST201910:20:48,904|-INFOinch.qos.logback.core.rolling.RollingFileAppender[errorAppender]-Activelogfilename:C:Users36537.IntelliJIdea2019.1systemtomcatUnnamed_o2o_3/logs/webapps/error.log10:20:48,904|-INFOinch.qos.logback.core.rolling.RollingFileAppender[errorAppender]-Filepropertyissetto[C:Users36537.IntelliJIdea2019.1systemtomcatUnnamed_o2o_3/logs/webapps/error.log]10:20:48,904|-WARNinch.qos.logback.core.rolling.RollingFileAppender[errorAppender]-Encoderhasnotbeenset.Cannotinvokeitsinitmethod.10:20:48,904|-ERRORinch.qos.logback.core.rolling.RollingFileAppender[errorAppender]-Noencodersetfortheappendernamed"errorAppender".10:20:48,904|-INFOinch.qos.logback.classic.joran.action.LoggerAction-Settingleveloflogger[com.imooc.o2o]toDEBUG10:20:48,904|-INFOinch.qos.logback.classic.joran.action.LoggerAction-Settingadditivityoflogger[com.imooc.o2o]totrue10:20:48,904|-INFOinch.qos.logback.core.joran.action.AppenderRefAction-Attachingappendernamed[infoAppender]toLogger[com.imooc.o2o]10:20:48,906|-INFOinch.qos.logback.core.joran.action.AppenderRefAction-Attachingappendernamed[debugAppender]toLogger[com.imooc.o2o]10:20:48,906|-INFOinch.qos.logback.core.joran.action.AppenderRefAction-Attachingappendernamed[errorAppender]toLogger[com.imooc.o2o]10:20:48,906|-INFOinch.qos.logback.classic.joran.action.RootLoggerAction-SettinglevelofROOTloggertoINFO10:20:48,906|-INFOinch.qos.logback.core.joran.action.AppenderRefAction-Attachingappendernamed[consoleAppender]toLogger[ROOT]10:20:48,906|-INFOinch.qos.logback.classic.joran.action.ConfigurationAction-Endofconfiguration.10:20:48,906|-INFOinch.qos.logback.classic.joran.JoranConfigurator@4d89bfc6-Registeringcurrentconfigurationassafefallbackpoint这个erro,怎么解决,求解10:20:48,904|-ERRORinch.qos.logback.core.rolling.RollingFileAppender[errorAppender]-Noencodersetfortheappendernamed"errorAppender".
查看完整描述

2 回答

?
潇湘沐

TA贡献1816条经验 获得超6个赞

没有日志格式吧
%-4relative[%thread]%-5level%logger{35}-%msg%n
logFile.log
....
%-4relative[%thread]%-5level%logger{35}-%msg%n
官网说明地址:appender
                            
查看完整回答
反对 回复 2019-05-20
?
慕盖茨4494581

TA贡献1850条经验 获得超11个赞

异常说的很明显,你的"debugAppender"配置里缺少encoder标签.
在配置里加上
%-4relative[%thread]%-5level%logger{35}-%msg%n
                            
查看完整回答
反对 回复 2019-05-20
  • 2 回答
  • 0 关注
  • 1243 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信