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

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

Closed
odrotbohm opened this issue May 8, 2019 · 1 comment
Assignees
Labels
in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@odrotbohm
Copy link
Member

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));
@odrotbohm odrotbohm added the in: test Issues in the test module label May 8, 2019
@sbrannen sbrannen added the type: enhancement A general enhancement label May 8, 2019
@sbrannen sbrannen self-assigned this May 8, 2019
@sbrannen sbrannen added this to the 5.2 M2 milestone May 8, 2019
@odrotbohm
Copy link
Member Author

Nice, thanks for the quick turnaround! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants