请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

文件中没有输出日志控制台有

rator.java:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addStatus(StatusViaSLF4JLoggerFactory.java:32)
at at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addInfo(StatusViaSLF4JLoggerFactory.java:20)
at at ch.qos.logback.classic.servlet.LogbackServletContainerInitializer.onStartup(LogbackServletContainerInitializer.java:32)
at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5152)
at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1719)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
at at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:479)
at at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:428)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
at at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at at javax.management.remote.rmi.RMIConnectionImpl.access300(RMIConnectionImpl.java:76)atatjavax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76) at at javax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)atatjavax.management.remote.rmi.RMIConnectionImplPrivilegedOperation.run(RMIConnectionImpl.java:1309)
at at java.security.AccessController.doPrivileged(Native Method)
at at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:361)
at at sun.rmi.transport.Transport$1.run(Transport.java:200)
at at sun.rmi.transport.Transport1.run(Transport.java:197)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.Transport.serviceCall(Transport.java:196)atatsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atatsun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197) at at java.security.AccessController.doPrivileged(Native Method) at at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at at sun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.Transport.serviceCall(Transport.java:196)atatsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atatsun.rmi.transport.tcp.TCPTransportConnectionHandler.run0(TCPTransport.java:826)
at at sun.rmi.transport.tcp.TCPTransportConnectionHandler.lambdaConnectionHandler.lambdaConnectionHandler.lambdarun0(TCPTransport.java:683)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683) at at java.security.AccessController.doPrivileged(Native Method) at at sun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:682)
at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NumberFormatException: For input string: "log.MaxHistory_IS_UNDEFINED"
at at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at at java.lang.Integer.parseInt(Integer.java:580)
at at java.lang.Integer.(Integer.java:867)
at at ch.qos.logback.core.joran.util.StringToObjectConverter.convertArg(StringToObjectConverter.java:61)
at at ch.qos.logback.core.joran.util.PropertySetter.setProperty(PropertySetter.java:122)
at … 65 common frames omitted
16:09:55,716 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@263528386 - Will use gz compression
16:09:55,716 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@263528386 - Will use the pattern C:/Users/user/AppData/Local/JetBrains/IntelliJIdea2020.2/tomcat/Unnamed_o2o/logs/webapps/info/info.%d{yyyy-MM-dd}.log for the active file
16:09:55,717 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is ‘yyyy-MM-dd’ from file name pattern ‘C:/Users/user/AppData/Local/JetBrains/IntelliJIdea2020.2/tomcat/Unnamed_o2o/logs/webapps/info/info.%d{yyyy-MM-dd}.log.gz’.
16:09:55,717 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
16:09:55,717 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Sat Nov 07 16:06:05 AEDT 2020
16:09:55,717 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:09:55,717 |-ERROR in ch.qos.logback.classic.PatternLayout(“null”) - Empty or null pattern.
16:09:55,718 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - Active log file name: C:\Users\user\AppData\Local\JetBrains\IntelliJIdea2020.2\tomcat\Unnamed_o2o/logs/webapps/info.log
16:09:55,718 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - File property is set to [C:\Users\user\AppData\Local\JetBrains\IntelliJIdea2020.2\tomcat\Unnamed_o2o/logs/webapps/info.log]
16:09:55,718 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
16:09:55,718 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [errorAppender]
16:09:55,718 |-WARN in ch.qos.logback.core.joran.util.PropertySetter@596b7c0f - Failed to set property [maxHistory] to value “log.MaxHistory_IS_UNDEFINED”. ch.qos.logback.core.util.PropertySetterException: Conversion to type [int] failed.
at ch.qos.logback.core.util.PropertySetterException: Conversion to type [int] failed.
at at ch.qos.logback.core.joran.util.PropertySetter.setProperty(PropertySetter.java:124)
at at ch.qos.logback.core.joran.util.PropertySetter.setProperty(PropertySetter.java:98)
at at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:95)
at at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:289)
at at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:172)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addStatus(StatusViaSLF4JLoggerFactory.java:32)
at at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addInfo(StatusViaSLF4JLoggerFactory.java:20)
at at ch.qos.logback.classic.servlet.LogbackServletContainerInitializer.onStartup(LogbackServletContainerInitializer.java:32)
at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5152)
at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1719)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
at at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:479)
at at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:428)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:286)
at at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at at javax.management.remote.rmi.RMIConnectionImpl.access300(RMIConnectionImpl.java:76)atatjavax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76) at at javax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)atatjavax.management.remote.rmi.RMIConnectionImplPrivilegedOperation.run(RMIConnectionImpl.java:1309)
at at java.security.AccessController.doPrivileged(Native Method)
at at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:361)
at at sun.rmi.transport.Transport$1.run(Transport.java:200)
at at sun.rmi.transport.Transport1.run(Transport.java:197)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.Transport.serviceCall(Transport.java:196)atatsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atatsun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197) at at java.security.AccessController.doPrivileged(Native Method) at at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at at sun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.Transport.serviceCall(Transport.java:196)atatsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atatsun.rmi.transport.tcp.TCPTransportConnectionHandler.run0(TCPTransport.java:826)
at at sun.rmi.transport.tcp.TCPTransportConnectionHandler.lambdaConnectionHandler.lambdaConnectionHandler.lambdarun0(TCPTransport.java:683)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683) at at java.security.AccessController.doPrivileged(Native Method) at at sun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)atatjava.security.AccessController.doPrivileged(NativeMethod)atatsun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:682)
at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NumberFormatException: For input string: "log.MaxHistory_IS_UNDEFINED"
at at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at at java.lang.Integer.parseInt(Integer.java:580)
at at java.lang.Integer.(Integer.java:867)
at at ch.qos.logback.core.joran.util.StringToObjectConverter.convertArg(StringToObjectConverter.java:61)
at at ch.qos.logback.core.joran.util.PropertySetter.setProperty(PropertySetter.java:122)
at … 65 common frames omitted
16:09:55,718 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@671110460 - Will use gz compression
16:09:55,718 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@671110460 - Will use the pattern C:/Users/user/AppData/Local/JetBrains/IntelliJIdea2020.2/tomcat/Unnamed_o2o/logs/webapps/error/error.%d{yyyy-MM-dd}.log for the active file
16:09:55,718 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is ‘yyyy-MM-dd’ from file name pattern ‘C:/Users/user/AppData/Local/JetBrains/IntelliJIdea2020.2/tomcat/Unnamed_o2o/logs/webapps/error/error.%d{yyyy-MM-dd}.log.gz’.
16:09:55,718 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
16:09:55,719 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Sat Nov 07 16:03:14 AEDT 2020
16:09:55,719 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:09:55,719 |-ERROR in ch.qos.logback.classic.PatternLayout(“null”) - Empty or null pattern.
16:09:55,719 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - Active log file name: C:\Users\user\AppData\Local\JetBrains\IntelliJIdea2020.2\tomcat\Unnamed_o2o/logs/webapps/error.log
16:09:55,719 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - File property is set to [C:\Users\user\AppData\Local\JetBrains\IntelliJIdea2020.2\tomcat\Unnamed_o2o/logs/webapps/error.log]
16:09:55,720 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.wjb.o2o] to DEBUG
16:09:55,721 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not find an appropriate class for property [appender]
16:09:55,721 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not find an appropriate class for property [appender]
16:09:55,721 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not find an appropriate class for property [appender]
16:09:55,721 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
16:09:55,721 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT]
16:09:55,721 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
16:09:55,722 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@b3b615e - Registering current configuration as safe fallback point

[2020-11-07 04:09:55,761] Artifact o2o:Web exploded: Artifact is deployed successfully
[2020-11-07 04:09:55,761] Artifact o2o:Web exploded: Deploy took 1,345 milliseconds
07-Nov-2020 16:10:04.278 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [E:\apache-tomcat-8.5.55\webapps\manager]
07-Nov-2020 16:10:04.296 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Web应用程序目录[E:\apache-tomcat-8.5.55\webapps\manager]的部署已在[18]毫秒内完成

配置





<!--控制台设置-->
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>${log.pattern}</pattern>
    </encoder>
</appender>

<!--DEBUG-->
<appender name="debugAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <!-- 文件路径 -->
    <file>${log.filePath}/debug.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <!-- 文件名称 -->
        <fileNamePattern>${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz
        </fileNamePattern>
        <!-- 文件最大保存历史数量 -->
        <maxHistory>${log.maxHistory}</maxHistory>
    </rollingPolicy>
    <encoder>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <filter class="ch.qos.logback.classic.filter.LevelFilter">
        <level>DEBUG</level>
        <onMatch>ACCEPT</onMatch>
        <onMismatch>DENY</onMismatch>
    </filter>
</appender>

<!--INFO-->
<appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <!--文件路径-->
    <file>${log.filePath}/info.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <!--文件名称-->
        <fileNamePattern>
            ${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz
        </fileNamePattern>
        <!--文件最大保存历史数量-->
        <maxHistory>${log.MaxHistory}</maxHistory>
    </rollingPolicy>
    <encoder>${log.pattern}</encoder>
    <filter class="ch.qos.logback.classic.filter.LevelFilter">
        <level>INFO</level>
        <onMatch>ACCEPT</onMatch>
        <onMismatch>DENY</onMismatch>
    </filter>
</appender>

<!--ERROR-->
<appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <!--文件路径-->
    <file>${log.filePath}/error.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <!--文件名称-->
        <fileNamePattern>
            ${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz
        </fileNamePattern>
        <!--文件最大保存历史数量-->
        <maxHistory>${log.MaxHistory}</maxHistory>
    </rollingPolicy>
    <encoder>${log.pattern}</encoder>
    <filter class="ch.qos.logback.classic.filter.LevelFilter">
        <level>ERROR</level>
        <onMatch>ACCEPT</onMatch>
        <onMismatch>DENY</onMismatch>
    </filter>
</appender>
<logger name="com.wjb.o2o" level="${log.level}" addtivity="true">
    <appender ref="debugAppender"/>
    <appender ref="infoAppender"/>
    <appender ref="errorAppender"/>
</logger>
<root level="info">
    <appender-ref ref="consoleAppender"/>
</root>

正在回答 回答被采纳积分+3

1回答

翔仔 2020-11-07 23:37:29

同学好,日志输出在这里 [C:\Users\user\AppData\Local\JetBrains\IntelliJIdea2020.2\tomcat\Unnamed_o2o/logs/webapps/error.log 看看

0 回复 有任何疑惑可以回复我~
  • 提问者 warren_au #1
    我说的就是这个,查看了没有任何东西显示,空的文件夹
    回复 有任何疑惑可以回复我~ 2020-11-09 07:48:12
  • 翔仔 回复 提问者 warren_au #2
    那应该就剩下配置的问题了,直接复制粘贴https://git.imooc.com/coding-144/coding-144/src/master/mvco2o/src/main/resources/logback.xml 没问题后,对比下异同
    回复 有任何疑惑可以回复我~ 2020-11-10 00:10:20
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信