logback:控制台没有catalina.base输出;logs文件夹里也没有webapps文件夹

来源:3-3 验证配置

蓝气球

2021-05-19

五月 19, 2021 12:26:59 上午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.2.25 using APR version 1.7.0.
五月 19, 2021 12:26:59 上午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
五月 19, 2021 12:26:59 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:o2o’ did not find a matching property.
五月 19, 2021 12:26:59 上午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.1.1g 21 Apr 2020)
五月 19, 2021 12:26:59 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-apr-8080”]
五月 19, 2021 12:26:59 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-apr-8009”]
五月 19, 2021 12:26:59 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 915 ms
五月 19, 2021 12:26:59 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 19, 2021 12:26:59 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.47
五月 19, 2021 12:27:00 上午 org.apache.catalina.util.SessionIdGenerator createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [298] milliseconds.
五月 19, 2021 12:27:00 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\learngit\o2o-1.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\o2o\WEB-INF\lib\javax.servlet-api-4.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
五月 19, 2021 12:27:04 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
五月 19, 2021 12:27:04 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“http-apr-8080”]
五月 19, 2021 12:27:04 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“ajp-apr-8009”]
五月 19, 2021 12:27:04 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 4898 ms

pom.xml和logback.xml文件都是复制的代码没有问题,尚没有找到问题所在;
网页访问后能正常打印输出:
2021-05-19 00:31:42.780 [http-apr-8080-exec-5] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'spring-dispatcher’
2021-05-19 00:31:44.057 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
2021-05-19 00:31:44.075 [http-apr-8080-exec-5] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.4 [built 23-March-2019 23:00:48 -0700; debug? true; trace: 10]
2021-05-19 00:31:45.581 [http-apr-8080-exec-5] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 2797 ms
2021-05-19 00:31:45.843 [http-apr-8080-exec-5] INFO com.imooc.o2o.web.superadmin.AreaController - =start=
2021-05-19 00:31:45.927 [http-apr-8080-exec-5] INFO c.m.v2.c3p0.impl.AbstractPoolBackedDataSource - 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, contextClassLoaderSource -> caller, dataSourceName -> 1bqub5uahzlqoxlukxzuc|2ea30392, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.cj.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1bqub5uahzlqoxlukxzuc|2ea30392, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/o2o?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
2021-05-19 00:31:45.952 [http-apr-8080-exec-5] WARN com.mchange.v2.resourcepool.BasicResourcePool - Bad pool size config, start 3 < min 10. Using 10 as start.
2021-05-19 00:31:46.965 [http-apr-8080-exec-5] DEBUG com.imooc.o2o.dao.AreaDao.queryArea - ==> Preparing: SELECT area_id, area_name, priority, create_time, last_edit_time FROM tb_area ORDER BY priority DESC
2021-05-19 00:31:47.086 [http-apr-8080-exec-5] DEBUG com.imooc.o2o.dao.AreaDao.queryArea - > Parameters:
2021-05-19 00:31:47.168 [http-apr-8080-exec-5] DEBUG com.imooc.o2o.dao.AreaDao.queryArea - < Total: 2
2021-05-19 00:31:47.196 [http-apr-8080-exec-5] ERROR com.imooc.o2o.web.superadmin.AreaController - =error=
2021-05-19 00:31:47.196 [http-apr-8080-exec-5] INFO com.imooc.o2o.web.superadmin.AreaController - =end=
2021-05-19 00:31:47.197 [http-apr-8080-exec-5] DEBUG com.imooc.o2o.web.superadmin.AreaController - costTime:[1352ms]

写回答

1回答

翔仔

2021-05-20

同学好,在电脑全局搜索一下logs看? 我看你这个控制台是有输出的呀,一般是启动之后,才会开始记录logback日志

0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程