gpt4 book ai didi

java - Spring Boot 应用程序日志显示 iRAv2 格式日志

转载 作者:行者123 更新时间:2023-11-30 05:21:03 24 4
gpt4 key购买 nike

这里有一个奇怪的问题。我有一个具有不同分支的 Spring Boot 应用程序。突然,其中一个功能分支显示 iRAv2 格式的日志(如下所示),并从实际日志消息中跳过一些原始日志消息。除了 Spring Boot 默认值之外,我不使用任何特定的日志记录库

iRAv2 格式日志:

  .   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.2.RELEASE)

Jan 02 10:34:23 [iRAv2] Starting PresApplication on testhostname with PID 20704 | o.s.boot.StartupInfoLogger:55
Jan 02 10:34:23 [iRAv2] No active profile set, falling back to default profiles: default | o.s.boot.SpringApplication:651

正确格式日志:

  .   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.2.RELEASE)

2020-01-02 10:37:36.454 INFO 20937 --- [ main] g.c.c.o.l.patientreg.PresApplication : Starting PresApplication on testhostname with PID 20937
2020-01-02 10:37:36.459 INFO 20937 --- [ main] g.c.c.o.l.patientreg.PresApplication : No active profile set, falling back to default profiles: default
2020-01-02 10:37:37.435 INFO 20937 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-01-02 10:37:37.442 INFO 20937 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-01-02 10:37:37.443 INFO 20937 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.29]
2020-01-02 10:37:37.680 INFO 20937 --- [ main] org.apache.jasper.servlet.TldScanner : 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.
2020-01-02 10:37:37.683 INFO 20937 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

最佳答案

您始终可以在 application.properties 中定义日志记录模式。

关于java - Spring Boot 应用程序日志显示 iRAv2 格式日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59566061/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com