Skip to content

Set logs level to WARN for production image - #3942

Closed
sbrunner wants to merge 1 commit into
masterfrom
test-cluster-mode-GSMFP-33
Closed

Set logs level to WARN for production image#3942
sbrunner wants to merge 1 commit into
masterfrom
test-cluster-mode-GSMFP-33

Conversation

@sbrunner

@sbrunner sbrunner commented Jan 22, 2026

Copy link
Copy Markdown
Member

See JIRA issue: GSMFP-33.

@sbrunner
sbrunner marked this pull request as ready for review January 22, 2026 08:32
@sbrunner
sbrunner requested review from Copilot and sebr72 January 22, 2026 08:32
@sbrunner sbrunner closed this Jan 22, 2026
@sbrunner
sbrunner deleted the test-cluster-mode-GSMFP-33 branch January 22, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the logging levels for several library loggers from DEBUG to WARN in the main logback.xml configuration file. The PR title indicates this is intended for production images, but the implementation affects all environments.

Changes:

  • Updated log levels from DEBUG to WARN for org.mapfish, com.codahale, org.springframework, org.apache, and org.hibernate loggers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +15
<logger name="org.mapfish" level="WARN" />
<logger name="com.codahale" level="WARN" />
<logger name="org.springframework" level="WARN" />
<logger name="org.apache" level="WARN" />
<logger name="org.hibernate" level="WARN" />

Copilot AI Jan 22, 2026

Copy link

Choose a reason for hiding this comment

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

This logging configuration affects all environments, not just production. The file core/src/main/resources/logback.xml is packaged into the application and used in all environments (development, testing, and production). Setting these loggers to WARN level will make debugging difficult in development and testing environments where DEBUG-level logs are often needed.

Consider implementing environment-specific logging configuration using one of these approaches:

  1. Use Spring profiles with logback-spring.xml and conditional configuration based on active profiles
  2. Create separate logback configuration files for different environments (e.g., logback-prod.xml, logback-dev.xml)
  3. Use environment variables or system properties to configure log levels dynamically

The current approach will suppress potentially useful DEBUG logs in all environments, which contradicts the PR title suggesting this is "for production image" only.

Copilot uses AI. Check for mistakes.
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.

2 participants