Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ECS structured logging takes away the Banner and startup logging #43820

Closed
sumitbytes01 opened this issue Jan 14, 2025 · 3 comments
Closed

Comments

@sumitbytes01
Copy link

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 14, 2025
@wilkinsona
Copy link
Member

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?

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jan 14, 2025
@philwebb philwebb changed the title enable ECS structured logging takes away the Banner and startup logging Enable ECS structured logging takes away the Banner and startup logging Jan 14, 2025
@spring-projects-issues
Copy link
Collaborator

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.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jan 21, 2025
@spring-projects-issues
Copy link
Collaborator

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.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants