| Summary: | JettyAwareLogger always formats the arguments | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Simone Bordet <simone.bordet> |
| Component: | other | Assignee: | Simone Bordet <simone.bordet> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 7.6.0.RC4 | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Fixed by adding a guard to JettyAwareLogger before formatting the message, that checks whether message log level is greater or equal than the logger's log level. |
JettyAwareLogger always formats the arguments passed in, resulting in unnecessary calls to toString() if the logger's level is greater than the method's logging level. That is, even if the logger is enabled for INFO level, calling logger.debug("A format string {}", this) results in this.toString() being called.