Skip to content

DefaultCacheAwareContextLoaderDelegate should log which application context instance was stored or retrieved from cache #22925

Closed
@odrotbohm

Description

@odrotbohm

The log output in DefaultCacheAwareContextLoaderDelegate.loadContext(…) currently logs details about the cache key used to store or obtain an ApplicationContext instance, but not the object identifier of the context stored or obtained.

If you try to debug a caching issue, it would be helpful if the context identifier was logged as well so that you can find out at what point (or rather: by which test case) the instance retrieved was originally created.

I locally tweaked the log statements to:

logger.debug(String.format("Storing ApplicationContext %s in cache under key [%s]", System.identityHashCode(context), mergedContextConfiguration));

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions