fix #251 by adding timing mention to with-logging

This commit is contained in:
Sean Corfield 2023-06-10 19:26:21 -07:00
parent 0bb665f767
commit ca23277d42
2 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,7 @@ Only accretive/fixative changes will be made from now on.
* 1.3.next in progress
* Address [#254](https://github.com/seancorfield/next-jdbc/issues/254) by adding `next.jdbc/active-tx?` and adding more explanation to [**Transactions**](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT/doc/getting-started/transactions) about the conventions behind transactions and the limitations of thread-local tracking of active transactions in `next.jdbc`.
* Address [#251](https://github.com/seancorfield/next-jdbc/issues/251) by updating `next.jdbc/with-logging` docstring.
* 1.3.874 -- 2023-04-15
* Fix [#248](https://github.com/seancorfield/next-jdbc/issues/248) by allowing `:port` to be `:none`.

View file

@ -434,8 +434,13 @@
* `next.jdbc/plan`, `next.jdbc/execute-one!`, `next.jdbc/execute!`,
or `next.jdbc/prepare`
* the vector containing the SQL string and its parameters
Whatever the sql/params logging function returns will be passed as a
`state` argument to the optional result logging function.
`state` argument to the optional result logging function. This means you can
use this mechanism to provide some timing information, since your sql/params
logging function can return the current system time, and your result logging
function can then calculate the elapsed time. There is an example of this in
the Naive Logging with Timing section of Getting Started.
The result logging function, if provided, will be called with the
same symbol passed to the sql/params logging function, the `state`