Comment From: wilkinsona
enable ECS structured logging takes away the Banner
This is intentional. The banner isn't in a structured format so the output would no longer be structured if it was included.
and startup logging
I'm not sure what you mean by this. With normal logging, starting a basic web application produces 9 separate entries:
2025-01-14T18:27:19.670Z INFO 20835 --- [ main] s.f.SampleWebFreeMarkerApplication : Starting SampleWebFreeMarkerApplication using Java 17.0.8.1 with PID 20835 (/Users/awilkinson/dev/spring-projects/spring-boot/4.0.x/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-freemarker/bin/main started by awilkinson in /Users/awilkinson/dev/spring-projects/spring-boot/4.0.x/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-freemarker)
2025-01-14T18:27:19.675Z INFO 20835 --- [ main] s.f.SampleWebFreeMarkerApplication : No active profile set, falling back to 1 default profile: "default"
2025-01-14T18:27:20.866Z INFO 20835 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-01-14T18:27:20.879Z INFO 20835 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-01-14T18:27:20.879Z INFO 20835 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.34]
2025-01-14T18:27:20.928Z INFO 20835 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-01-14T18:27:20.930Z INFO 20835 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1186 ms
2025-01-14T18:27:21.384Z INFO 20835 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
2025-01-14T18:27:21.393Z INFO 20835 --- [ main] s.f.SampleWebFreeMarkerApplication : Started SampleWebFreeMarkerApplication in 2.244 seconds (process running for 2.727)
With structured logging enabled, 9 separate entries are also produced:
{"@timestamp":"2025-01-14T18:28:15.521262Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"smoketest.freemarker.SampleWebFreeMarkerApplication","message":"Starting SampleWebFreeMarkerApplication using Java 17.0.8.1 with PID 21101 (\/Users\/awilkinson\/dev\/spring-projects\/spring-boot\/4.0.x\/spring-boot-tests\/spring-boot-smoke-tests\/spring-boot-smoke-test-web-freemarker\/bin\/main started by awilkinson in \/Users\/awilkinson\/dev\/spring-projects\/spring-boot\/4.0.x\/spring-boot-tests\/spring-boot-smoke-tests\/spring-boot-smoke-test-web-freemarker)","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:15.533211Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"smoketest.freemarker.SampleWebFreeMarkerApplication","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.005079Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.springframework.boot.web.embedded.tomcat.TomcatWebServer","message":"Tomcat initialized with port 8080 (http)","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.016318Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.apache.catalina.core.StandardService","message":"Starting service [Tomcat]","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.016744Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.apache.catalina.core.StandardEngine","message":"Starting Servlet engine: [Apache Tomcat\/10.1.34]","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.076547Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[\/]","message":"Initializing Spring embedded WebApplicationContext","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.077839Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext","message":"Root WebApplicationContext: initialization completed in 1449 ms","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.569121Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"org.springframework.boot.web.embedded.tomcat.TomcatWebServer","message":"Tomcat started on port 8080 (http) with context path '\/'","ecs.version":"8.11"}
{"@timestamp":"2025-01-14T18:28:17.579904Z","log.level":"INFO","process.pid":21101,"process.thread.name":"main","log.logger":"smoketest.freemarker.SampleWebFreeMarkerApplication","message":"Started SampleWebFreeMarkerApplication in 2.807 seconds (process running for 3.534)","ecs.version":"8.11"}
Can you please provide an example of the startup logging that has been taken away?
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.