测试logback好象没有在控制台输出,跟老师的不一样?
这是控制台信息: D:\tomcat8\apache-tomcat-8.5.42\bin\catalina.bat run [2019-08-06 07:48:02,893] Artifact o2o:war exploded: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o" Using CATALINA_HOME: "D:\tomcat8\apache-tomcat-8.5.42" Using CATALINA_TMPDIR: "D:\tomcat8\apache-tomcat-8.5.42\temp" Using JRE_HOME: "D:\java8" Using CLASSPATH: "D:\tomcat8\apache-tomcat-8.5.42\bin\bootstrap.jar;D:\tomcat8\apache-tomcat-8.5.42\bin\tomcat-juli.jar" 06-Aug-2019 19:48:03.480 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.42 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 4 2019 20:29:04 UTC 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.42.0 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\java8\jre 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_211-b12 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\tomcat8\apache-tomcat-8.5.42 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o\conf\logging.properties 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 06-Aug-2019 19:48:03.481 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o\jmxremote.password 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o\jmxremote.access 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\webyy\.IntelliJIdea2019.1\system\tomcat\Unnamed_o2o 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\tomcat8\apache-tomcat-8.5.42 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\tomcat8\apache-tomcat-8.5.42\temp 06-Aug-2019 19:48:03.482 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 06-Aug-2019 19:48:03.484 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 06-Aug-2019 19:48:03.484 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 06-Aug-2019 19:48:03.486 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 06-Aug-2019 19:48:03.546 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 06-Aug-2019 19:48:03.553 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 06-Aug-2019 19:48:03.558 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] 06-Aug-2019 19:48:03.559 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 06-Aug-2019 19:48:03.559 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 232 ms 06-Aug-2019 19:48:03.571 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 06-Aug-2019 19:48:03.571 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.42 06-Aug-2019 19:48:03.576 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 06-Aug-2019 19:48:03.583 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] 06-Aug-2019 19:48:03.584 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 24 ms Connected to server [2019-08-06 07:48:03,930] Artifact o2o:war exploded: Artifact is being deployed, please wait... 19:48:05,161 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 19:48:05,161 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 19:48:05,161 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/myworkcode/java/o2o/target/o2o/WEB-INF/classes/logback.xml] 19:48:05,221 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 19:48:05,224 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/D:/myworkcode/java/o2o/target/o2o/WEB-INF/classes/logback.xml] 19:48:05,224 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 1 minutes 19:48:05,232 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:46 - no applicable action for [propert], current ElementPath is [[configuration][propert]] 19:48:05,232 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@5:47 - no applicable action for [propert], current ElementPath is [[configuration][propert]] 19:48:05,232 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@6:73 - no applicable action for [propert], current ElementPath is [[configuration][propert]] 19:48:05,232 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@7:106 - no applicable action for [propert], current ElementPath is [[configuration][propert]] 19:48:05,232 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 19:48:05,236 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [consoleAppender] 19:48:05,238 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 19:48:05,272 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 19:48:05,276 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [debugAppender] 19:48:05,277 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@17:83 - no applicable action for [roliingPolicy], current ElementPath is [[configuration][appender][roliingPolicy]] 19:48:05,277 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@18:30 - no applicable action for [fileNamePattern], current ElementPath is [[configuration][appender][roliingPolicy][fileNamePattern]] 19:48:05,277 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@21:25 - no applicable action for [maxHistory], current ElementPath is [[configuration][appender][roliingPolicy][maxHistory]] 19:48:05,277 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 19:48:05,279 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[debugAppender] - No TriggeringPolicy was set for the RollingFileAppender named debugAppender 19:48:05,279 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[debugAppender] - For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp 19:48:05,279 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 19:48:05,279 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [infoAppender] 19:48:05,279 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@39:83 - no applicable action for [roliingPolicy], current ElementPath is [[configuration][appender][roliingPolicy]] 19:48:05,279 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@40:30 - no applicable action for [fileNamePattern], current ElementPath is [[configuration][appender][roliingPolicy][fileNamePattern]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@43:25 - no applicable action for [maxHistory], current ElementPath is [[configuration][appender][roliingPolicy][maxHistory]] 19:48:05,280 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 19:48:05,280 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - No TriggeringPolicy was set for the RollingFileAppender named infoAppender 19:48:05,280 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp 19:48:05,280 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 19:48:05,280 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [errorAppender] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@61:83 - no applicable action for [roliingPolicy], current ElementPath is [[configuration][appender][roliingPolicy]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@62:30 - no applicable action for [fileNamePattern], current ElementPath is [[configuration][appender][roliingPolicy][fileNamePattern]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@65:25 - no applicable action for [maxHistory], current ElementPath is [[configuration][appender][roliingPolicy][maxHistory]] 19:48:05,280 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 19:48:05,280 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - No TriggeringPolicy was set for the RollingFileAppender named errorAppender 19:48:05,280 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@79:72 - no applicable action for [blogger], current ElementPath is [[configuration][blogger]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@80:44 - no applicable action for [appender-ref], current ElementPath is [[configuration][blogger][appender-ref]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@81:43 - no applicable action for [appender-ref], current ElementPath is [[configuration][blogger][appender-ref]] 19:48:05,280 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@82:44 - no applicable action for [appender-ref], current ElementPath is [[configuration][blogger][appender-ref]] 19:48:05,281 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 19:48:05,281 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT] 19:48:05,281 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 19:48:05,282 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6263b566 - Registering current configuration as safe fallback point 06-Aug-2019 19:48:05.325 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [2019-08-06 07:48:05,355] Artifact o2o:war exploded: Artifact is deployed successfully [2019-08-06 07:48:05,356] Artifact o2o:war exploded: Deploy took 1,426 milliseconds 06-Aug-2019 19:48:08.608 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'spring': initialization started 06-Aug-2019 19:48:08.634 信息 [http-nio-8080-exec-4] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'spring-servlet': startup date [Tue Aug 06 19:48:08 CST 2019]; root of context hierarchy 06-Aug-2019 19:48:08.680 信息 [http-nio-8080-exec-4] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [D:\myworkcode\java\o2o\target\o2o\WEB-INF\classes\spring\spring-dao.xml] 06-Aug-2019 19:48:08.757 信息 [http-nio-8080-exec-4] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [D:\myworkcode\java\o2o\target\o2o\WEB-INF\classes\spring\spring-service.xml] 06-Aug-2019 19:48:08.844 信息 [http-nio-8080-exec-4] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [D:\myworkcode\java\o2o\target\o2o\WEB-INF\classes\spring\spring-web.xml] 06-Aug-2019 19:48:09.150 信息 [http-nio-8080-exec-4] com.mchange.v2.log.MLog.<clinit> MLog clients using java 1.4+ standard logging. 06-Aug-2019 19:48:09.181 信息 [http-nio-8080-exec-4] com.mchange.v2.c3p0.C3P0Registry.banner Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10] 06-Aug-2019 19:48:09.722 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/superadmin/listarea],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.webyy.o2o.web.superadmin.AreaController.listArea() 06-Aug-2019 19:48:10.023 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'spring-servlet': startup date [Tue Aug 06 19:48:08 CST 2019]; root of context hierarchy 06-Aug-2019 19:48:10.070 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'spring-servlet': startup date [Tue Aug 06 19:48:08 CST 2019]; root of context hierarchy 06-Aug-2019 19:48:10.119 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0' 06-Aug-2019 19:48:10.122 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0' 06-Aug-2019 19:48:10.185 信息 [http-nio-8080-exec-4] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'spring': initialization completed in 1577 ms log.pattern_IS_UNDEFINED06-Aug-2019 19:48:10.277 信息 [http-nio-8080-exec-4] com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 10000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge0zea4sif5uauzxrkl|2bbd941, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge0zea4sif5uauzxrkl|2bbd941, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/o2o?useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 40, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ] log.pattern_IS_UNDEFINEDlog.pattern_IS_UNDEFINED06-Aug-2019 19:48:13.578 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat8\apache-tomcat-8.5.42\webapps\manager] 06-Aug-2019 19:48:13.599 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat8\apache-tomcat-8.5.42\webapps\manager] has finished in [21] ms
我是用idea开发的,这是logback.xml
<?xml version="1.0" encoding="utf-8" ?> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <propert name="log.level" value="debug"/> <propert name="logmaxHistory" value="30"/> <propert name="log.filePath" value="${catalina.base}/logs/webapps"/> <propert name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS [%thread]%-5level %logger{50}-%msg%n"/> <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> <roliingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <maxHistory> ${log.maxHistory} </maxHistory> </roliingPolicy> <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> <roliingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <maxHistory> ${log.maxHistory} </maxHistory> </roliingPolicy> <encoder> <pattern>${log.pattern}</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> <roliingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <maxHistory> ${log.maxHistory} </maxHistory> </roliingPolicy> <encoder> <pattern>${log.pattern}</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <blogger name="com.webyy.o2o" level="${log.level}" additity="true"> <appender-ref ref="debugAppender"/> <appender-ref ref="infoAppender"/> <appender-ref ref="errorAppender"/> </blogger> <root level="info"> <appender-ref ref="consoleAppender"/> </root> </configuration>
16
收起
正在回答
2回答
同学你好:
这里要改一下呦:
、
修改成:
如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
4. SSM到Spring Boot入门与综合实战
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星