Skip to content

Conversation

@jamesfredley
Copy link
Contributor

Prevents: WARN in Logger[StackTrace] - No appenders present in context [default] for logger [StackTrace].

The 'additivity="false"' attribute was removed from the StackTrace logger configuration in multiple logback-spring.xml files and the logback.rocker.raw template. This change simplifies the logger configuration and ensures it extends the root logger.

Prevents:  WARN in Logger[StackTrace] - No appenders present in context [default] for logger [StackTrace].

The 'additivity="false"' attribute was removed from the StackTrace logger configuration in multiple logback-spring.xml files and the logback.rocker.raw template. This change simplifies the logger configuration and ensures it extends the root logger.
@jamesfredley jamesfredley self-assigned this Sep 10, 2025
@jamesfredley jamesfredley moved this to In Progress in Apache Grails Sep 10, 2025
@jamesfredley jamesfredley added this to the grails:7.0.0 milestone Sep 10, 2025
@jamesfredley jamesfredley requested review from jdaugherty and matrei and removed request for jdaugherty September 10, 2025 18:54
Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

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

So we're saying we should effectively configure all loggers as the root loggers and not allow messages to go to multiple logs? Isn't the additivity configuration so that an exception logs to both the console log + an error log?

Copy link
Contributor

@matrei matrei left a comment

Choose a reason for hiding this comment

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

Good catch! With no appender and additivity disabled, events didn’t bubble up and were discarded.

@jamesfredley
Copy link
Contributor Author

The default generated logback config throws the following error when there is an exception in a controller. I am not sure how it made it ~1 year that way, but this was focused on resolving that issue.

WARN in Logger[StackTrace] - No appenders present in context [default] for logger [StackTrace].

I did not explore "exception logs to both the console log + an error log", just resolved the issue above, but the end user could go in that direction instead of the default generated simpler config.

@jamesfredley jamesfredley merged commit 126e6fd into 7.0.x Sep 11, 2025
37 of 38 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails Sep 11, 2025
@jamesfredley jamesfredley deleted the stacktrace-additivity branch September 11, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants