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

Log error before emitting application failed event #14980

Closed
wants to merge 1 commit into from
Closed

Log error before emitting application failed event #14980

wants to merge 1 commit into from

Conversation

jorgefr
Copy link

@jorgefr jorgefr commented Oct 27, 2018

This is simplest possible solution.

With the previous implementation, the error never gets logged, because the SLF4JBridgeHandler is removed from the root logger as a response to the ApplicationFailedEvent

Some details about it:
#14979

Obvious Fix

@pivotal-issuemaster
Copy link

@jorgefr Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 27, 2018
@pivotal-issuemaster
Copy link

@jorgefr This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

With the previous implementation, the error never gets logged, because the SLF4JBridgeHandler is removed from the root logger as a response to the ApplicationFailedEvent
@philwebb
Copy link
Member

Unfortunately we can't switch the logging in exactly the way that you've suggested. The existing reportFailure method only performs logging if an SpringBootExceptionReporter doesn't deal with the failure. I'll close this one and we can consider alternatives in #14979

@philwebb philwebb closed this Oct 27, 2018
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 27, 2018
@jorgefr jorgefr deleted the log-startup-error-earlier branch October 27, 2018 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants