Skip to content

Make STDOUT log pattern configurable via WAVE_LOG_STDOUT_PATTERN#1055

Merged
munishchouhan merged 4 commits into
masterfrom
add-date-stdout-logs
May 28, 2026
Merged

Make STDOUT log pattern configurable via WAVE_LOG_STDOUT_PATTERN#1055
munishchouhan merged 4 commits into
masterfrom
add-date-stdout-logs

Conversation

@munishchouhan

@munishchouhan munishchouhan commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Extracts the Logback STDOUT pattern in src/main/resources/logback.xml into a WAVE_LOG_STDOUT_PATTERN property, so deployments can override it via env var or system property.
  • Default pattern is unchanged (%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg >> wt=%X{requestId}%n); deployments whose log collector already timestamps lines can set the variable to a pattern without the leading %d{...} token to drop Wave's own date prefix.
  • Documents the new variable in docs/configuration.md under a new Logging section.

Test plan

  • Start Wave with no override and confirm STDOUT lines still render as 14:23:01.123 [main] INFO ...
  • Restart Wave with WAVE_LOG_STDOUT_PATTERN='[%thread] %-5level %logger{36} - %msg >> wt=%X{requestId}%n' and confirm STDOUT lines no longer carry a date prefix
  • Verify the file appender output (${WAVE_LOG_NAME}.log) is unaffected by the override

🤖 Generated with Claude Code

Include month and day in the console appender timestamp so log entries
are unambiguous when read across days (e.g. in k8s pod logs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@munishchouhan munishchouhan self-assigned this May 26, 2026
@munishchouhan munishchouhan requested a review from gavinelder May 26, 2026 15:52
@gwright99

Copy link
Copy Markdown
Member

🥳

@gwright99 gwright99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Having the date in the logs will make it much easier to troubleshoot when I have to pull log records directly via kubectl instead of via an aggregator.

Allows per-deployment override of the Logback STDOUT pattern (e.g. to
omit the date prefix when the log collector already timestamps lines).
Default pattern is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@munishchouhan munishchouhan changed the title Add date to STDOUT log pattern in logback Make STDOUT log pattern configurable via WAVE_LOG_STDOUT_PATTERN May 28, 2026
@munishchouhan

Copy link
Copy Markdown
Member Author

tested locally:
WAVE_LOG_STDOUT_PATTERN=%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg >> wt=%X{requestId}%n

logs:

May-28 16:08:27.876 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'DEBUG' for logger: 'io.seqera.wave.service.job' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'DEBUG' for logger: 'io.seqera' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'TRACE' for logger: 'io.seqera.wave.service.pairing' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'TRACE' for logger: 'io.seqera.wave.service.k8s.k8s-service-impl' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'TRACE' for logger: 'io.seqera.wave.service.request.ContainerRequestServiceImpl' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'DEBUG' for logger: 'io.seqera.wave.service.data' >> wt=
May-28 16:08:27.877 [main] INFO  i.m.l.PropertiesLoggingLevelsConfigurer - Setting log level 'TRACE' for logger: 'io.seqera.wave.service.request.container-request-service-impl' >> wt=
May-28 16:08:27.919 [main] INFO  i.s.w.s.mail.impl.MailSpoolerImpl - + Mail service started [MailSpoolerImpl]; provider=MailProviderImpl >> wt=
May-28 16:08:27.925 [main] INFO  io.micronaut.runtime.Micronaut - Startup completed in 1670ms. Server Running: http://localhost:9090 >> wt=

@munishchouhan munishchouhan merged commit 15ab755 into master May 28, 2026
4 checks passed
@munishchouhan munishchouhan deleted the add-date-stdout-logs branch May 28, 2026 14:16
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

Successfully merging this pull request may close these issues.

3 participants