https://bz.apache.org/bugzilla/show_bug.cgi?id=61391
Bug ID: 61391 Summary: SlowQueryReport not logging Failed Query if connection abandoned Product: Tomcat 8 Version: 8.5.x-trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: c.w...@crossflight.com Target Milestone: ---- In SlowQueryReport.reportFailedQuery() a change has been made to check if QueryStats is null before calling QueryStats.failure(). However, the logging is also included in this if block. The logging should happen regardless of whether QueryStats is null or not, so that the SQL is logged. Current code: QueryStats qs = this.getQueryStats(sql); if (qs != null) { qs.failure(delta, now); if (isLogFailed() && log.isWarnEnabled()) { log.warn("Failed Query Report SQL="+sql+"; time="+delta+" ms;"); } } Suggested fix: QueryStats qs = this.getQueryStats(sql); if (qs != null) { qs.failure(delta, now); } if (isLogFailed() && log.isWarnEnabled()) { log.warn("Failed Query Report SQL="+sql+"; time="+delta+" ms;"); } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org