Description
It would be useful to have the ability to override the log.Logger
configured on the driver when calling ExecuteQuery
or creating a new session. This way, callers could use a logger that includes context specific to the query / session, to help correlate (e.g.) query error logs with the originating query.
Motivating case: if a query experiences frequent deadlocks or other transient errors that don't bubble up to the application code, it can be difficult to identify which query causes the error logs.
sessionWithContext
already includes a copy of the logger internally - I think all that's required is that a log.Logger
is added as a field on SessionConfg
/ ExectueQueryConfiguration
, and that this is allowed to override the logger from the driver when the session is created.