Skip to content

Revisit BeansException warn logging after startup failure [SPR-13663] #18238

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

Closed
spring-projects-issues opened this issue Nov 10, 2015 · 5 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 10, 2015

Phil Webb opened SPR-13663 and commented

#16626 added warn logging to AbstractApplicationContext to ensure that BeansExceptions don't get missed.

Although the intention is good, it has the unwanted side effect of causing most refresh failures to log stacktraces twice. This is particularly obvious with Spring Boot applications where a simple startup failure results in multiple stack-traces.

We could provide a feature flag to suppress the message.


Affects: 3.2.15, 4.1.8, 4.2.2

Issue Links:

Referenced from: commits 03585f2, 5d6aab3, cdf6eb9

Backported to: 4.1.9, 3.2.16

@spring-projects-issues
Copy link
Collaborator Author

Phil Webb commented

Pull-request #917

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Nov 10, 2015

Phil Webb commented

I'm in two minds about the feature flag. We could probably argue that warn logging is overkill and simply downgrade it to debug. The message was only added because the original reporter of #16626 had a deadlock, for most situations the rethrown exception will be logged eventually.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

No need to wait until 4.2.4 - can easily deal with this for 4.2.3 still :-)

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Resolved through reducing the warn log entry to a single line with exception type and message but no stacktrace, as discussed on Skype.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Phil Webb commented

Has this been pushed? I don't see any update to the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants