我有一个基本的SpringBoot 2.0.5.RELEASE应用程序。使用Spring Initializer,JPA,嵌入式Tomcat,Thymeleaf模板引擎,并将其打包为可执行的JAR文件和Logback(旨在作为流行的log4j项目的后继者),
但是该应用程序。启动时冻结,这是我在控制台中看到的:
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.5.RELEASE)
16:25:42,044 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:42,054 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:42,054 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:42,059 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:42,059 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:42,060 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:42,072 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:42,072 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.2.log.zip
16:25:42,073 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.1.log.zip
16:25:42,075 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.2.log.zip
16:25:44,220 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:44,222 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:46,372 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:46,377 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.2.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.3.log.zip]
16:25:46,377 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:48,240 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:48,242 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:48,243 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:48,245 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:48,249 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:48,252 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:48,254 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.3.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.4.log.zip]
16:25:48,255 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.2.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.3.log.zip]
16:25:48,256 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:48,256 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
这是我的logback.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">
<property resource="application.properties"/>
<!-- trace, debug, info, warn, error, fatal -->
<timestamp key="myTimestamp" datePattern="yyyy-MM-dd'_'HH-mm-ss.SSS"/>
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
<!-- To enable JMX Management -->
<jmxConfigurator/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{"yyyy-MM-dd HH:mm"} [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/${logfile.path}/${logfile.name}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/${logfile.path}/${logfile.name}.%i.log.zip</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>1MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%d{"yyyy-MM-dd HH:mm"} [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<!-- <logger name="org.springframework.orm.jpa" level="debug" /> -->
<logger name="com.trivikramasana" level="debug" />
<logger name="uk.co.jemos.podam" level="warn" />
<logger name="org.thymeleaf" level="info" />
<logger name="org.springframework" level="info" />
<logger name="org.hibernate" level="info" />
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="warn" />
<logger name="org.springframework.web" level="info" />
<logger name="org.springframework.security" level="info" />
<root level="debug">
<!--appender-ref ref="CONSOLE" /-->
<appender-ref ref="FILE" />
</root>
</configuration>
答案 0 :(得分:0)
我不认为该应用程序已冻结。查看您的日志/日志配置,日志将被重定向到FILE附加程序,包ch.qos.logback.core
除外。
因此,应用程序应该正在运行并注销文件。如果有任何问题,则应将其记录在RollingFileAppender
的{{1}}中提到的文件中。
冻结不得为状态。它已崩溃或正在运行。日志中应该详细说明。