Skip to content

what is recommended log level for org.springframework packages #23199

Closed as not planned
@boojongmin

Description

@boojongmin

when I destroy bean, I can not check error log.

my logback configuration is

<logger name="com.company" level="DEBUG"/>
 <root level="ERROR">
     <appender-ref ref="STDOUT" />
 </root>

bean destroy method

@PreDestroy
void destory() {
  throw new RuntimeException("message");
}

console log

09:27:45.932 [Thread-8] INFO  o.s.b.f.s.DisposableBeanAdapter - Destroy method 'destroy' on bean with name 'sqsReceiver' threw an exception: java.lang.RuntimeException: message

I couldn't see logs because my configuration of 'org.springframework' is 'ERROR'.
I waste lots of time on debugging.

would you explain spring logging rules?

and i think configuration for log level might be "warn" or "error" rather than log lovel "info".(DisposableBeanAdapter invokeCustomDestroyMethod)

I pull requested to #23200

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions