Skip to content
Snippets Groups Projects
Unverified Commit b8c81d02 authored by dpsutton's avatar dpsutton Committed by GitHub
Browse files

Cleanup logging diagnostic info (#16008)

not-empty so that we don't output a dumb string like

>  null DB null connections: null/null (null threads blocked)

Also put the call to `name` behind a some-> so there's no
NPE. Everything else will just output a null if its missing
parent 76ed655a
No related branches found
No related tags found
No related merge requests found
......@@ -67,10 +67,10 @@
" "
(trs "({0} queued)" (streaming-response.thread-pool/queued-thread-count))
(when diag-info-fn
(if-let [diag-info (diag-info-fn)]
(if-let [diag-info (not-empty (diag-info-fn))]
(format
"; %s DB %s connections: %d/%d (%d threads blocked)"
(-> diag-info ::sql-jdbc.execute.diagnostic/driver name)
(some-> diag-info ::sql-jdbc.execute.diagnostic/driver name)
(::sql-jdbc.execute.diagnostic/database-id diag-info)
(::sql-jdbc.execute.diagnostic/active-connections diag-info)
(::sql-jdbc.execute.diagnostic/total-connections diag-info)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment