• Patch
  • Status: New
  • 2 Major
  • Resolution:
  • ehcache-core
  • ljacomet
  • Reporter: kmacleod
  • October 16, 2013
  • 0
  • Watchers: 4
  • November 04, 2013

Attachments

Description

When {{DefaultSizeOfEngine #sizeOf}} catches a {{MaxDepthExceededException}}, it logs it in a complex multi-line logging expression. The information that is logged isn’t especially useful, though, and we find it often swamps the logs with unhelpful information.

Rather than try to come up with a generic, works-for-everyone log format, I thought the easiest first step is to perform the logging in a separate, protected method of {{DefaultSizeOfEngine}}, which allows custom {{SizeOfEngine}} implementations to override the logging to fit their own needs.

I’ve attached a patch that achieves this.

Comments

Louis Jacomet Jacomet 2013-10-16

What do you want to achieve here that would not be achieved by improving the logging as requested in EHC-1056 and relying on configuring your logger to silence or not the log statements?

Kenny MacLeod 2013-10-16

EHC-1056 would improve the general situation that would provide more useful logging in the majority of cases. However, we have use-cases here that would involve digging into specific types to provide extended diagnostic information on the cause of the depth-exceeded exception. This by necessity would be application-specific code, and would require a subclass or re-implementation of {{DefaultSizeOfEngine}}.