You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hi @zolstein, thanks for taking the time to open this.
This seems like a reasonable suggestion, especially for cases like tracking transient errors more effectively. I'll bring it up with the team and see if we can add support for this.
Would you expect the session/query logger to fall back to the driver’s logger if unset, with the logger on the session-level being optional? I've seen your implementation and can see you've suggested adding an ExecuteQueryWithLogger which is a nice approach 👍.
It would be useful to have the ability to override the
log.Logger
configured on the driver when callingExecuteQuery
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 alog.Logger
is added as a field onSessionConfg
/ExectueQueryConfiguration
, and that this is allowed to override the logger from the driver when the session is created.The text was updated successfully, but these errors were encountered: