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

JamonPerformanceMonitorInterceptor logger.trace() without isTraceEnabled() [SPR-1798] #6492

Closed
spring-issuemaster opened this issue Mar 16, 2006 · 4 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Mar 16, 2006

Dejan Predovic opened SPR-1798 and commented

JamonPerformanceMonitorInterceptor can be very useful for generating performance summaries, even when log tracing itself is turned off. It would be nice to put isTraceEnabled() around logger.trace() to minimize performance impact of (non-trivial) Monitor.toString() for such cases.


Affects: 1.2.7, 2.0 M3

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 20, 2006

Juergen Hoeller commented

The problem here is that the entire invokeUnderTrace method won't be called if logger.isTraceEnabled() returns false. So you'd need to override isLogEnabled in the first place to always return "true", else the entire Jamon handling in invokeUnderTrace won't become effective. This would be a little strange, though, since isLogEnabled is really meant to activate the actual logging...

Juergen

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 20, 2006

Dejan Predovic commented

Would it make more sense then to create another, non-tracing, jamon interceptor then? (JamonPerformanceSummaryMonitorInterceptor or something like that)

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 21, 2006

Juergen Hoeller commented

I'll revisit this for 2.0 M4. Maybe we can refine JamonPerformanceMonitorInterceptor itself to allow for both usage scenarios.

Juergen

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 26, 2006

Juergen Hoeller commented

I've added a "trackAllInvocations" flag to JamonPerformanceMonitorInterceptor, for gathering statistics without logging. It's off by default but can be activated through specifying "true" as value for the corresponding bean property.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.