Java Spring引导应用程序日志显示iRAv2格式日志
这是一个奇怪的问题。我有一个具有不同分支的Spring Boot应用程序。突然,一个feature分支以iRAv2格式显示日志(如下所示),并从实际日志消息中跳过一些原始日志消息。除了Spring引导默认值之外,我不使用任何特定的日志库 iRAv2格式日志:Java Spring引导应用程序日志显示iRAv2格式日志,java,spring,spring-boot,Java,Spring,Spring Boot,这是一个奇怪的问题。我有一个具有不同分支的Spring Boot应用程序。突然,一个feature分支以iRAv2格式显示日志(如下所示),并从实际日志消息中跳过一些原始日志消息。除了Spring引导默认值之外,我不使用任何特定的日志库 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
正确的日志格式:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: 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
你总是可以在应用程序中定义你的日志记录模式。属性该功能分支中更改了哪些文件?什么是iRAv2?你在应用程序的任何地方都使用这个吗?@SimonMartinelli不,我在任何地方都不使用这个。事实上我不知道它是什么is@DavidLavender我比较了两个树枝,不是吗differences@DavidLavender我解决了这个问题。导致此问题的第三方库之一。但这个问题并不一致,这意味着我有一个正在开发和掌握的库,在那里我看不到任何问题。不管怎样,我现在定义了自定义logback.xml,我明白了。我只想使用默认的spring引导日志模式,而不是定义我自己的格式。事实证明,一个依赖库开发人员在他的
logback.xml
文件中定义的iRAV2格式导致了这个问题。现在我必须重写logback.xml文件