Repository navigation
Raise log level when bean destruction fails - #23200
boojongmin wants to merge 2 commits into
Conversation
|
On review, this is a regression from 5.0/4.3 where we mostly logged bean destruction exceptions at warn level. Restoring this in 5.1.9 seems feasible, even within the revised log level usage that we introduced in 5.1 (for less noise at info and warn level). That said, such exceptions are technically not a hard error but rather just a partial effect in a multi-step destruction process, so logging at error level would arguably create unnecessary (follow-up) noise for scenarios with many related beans that need to be destroyed. This is particularly relevant for production scenarios where error level may trigger operator escalations. Generally speaking, we recommend running with info or at least warn log level in development. Also, destroy method ideally should not propagate exceptions but rather handle them locally (possibly even log them locally with a descriptive log message). |
|
Thank you for your kind reply. |
related to this issue #23199
logger runned on
org.springframework.beans.factory.supportpackage.but InvocationTargetException was makes by my code.
I want to check my error log.