Skip to content

Conversation

@EricWittmann
Copy link
Member

Summary

  • Apply log level configuration at application startup using @Observes StartupEvent
  • Ensures early initialization messages are captured in console output
  • Maintains scheduled job for dynamic runtime updates
  • Also adjusts some log levels in DynamicConfigSource to reduce noise and improve signal

Problem

Early initialization log messages (such as those in AbstractSqlRegistryStorage.initialize()) were not showing up in the console output because the configured log level was only applied via a scheduled job that ran too late.

Solution

Added a startup observer method to DynamicLogConfigurationService that applies the initial log level configuration when the application starts. This ensures the configured log level is applied early enough to capture all initialization and startup log messages.

Test plan

  • Code changes compile successfully
  • Start application with apicurio.log.level=INFO environment variable set
  • Verify that initialization messages from AbstractSqlRegistryStorage appear in console output
  • Verify that changing the log level dynamically still works via the scheduled job

Fixes #6963

…up messages

Apply log level configuration at application startup to ensure early
initialization messages are captured. Previously, the log level was only
applied via a scheduled job, which ran too late to capture messages from
classes like AbstractSqlRegistryStorage during database initialization.

Added a startup observer method that applies the initial log level
configuration when the application starts, while maintaining the
scheduled job for dynamic runtime updates.

Also adjusted some log levels in DynamicConfigSource to reduce noise
(trace instead of debug) and improve signal (warn instead of debug when
storage is not present).

Fixes #6963
@EricWittmann EricWittmann merged commit 0bbef52 into main Dec 3, 2025
21 checks passed
@EricWittmann EricWittmann deleted the fix-log-level-startup-6963 branch December 3, 2025 22:45
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.

Log level configuration not applied early enough to capture startup messages

2 participants