Implement AcquireTracer and ReleaseTracer for TraceLog#2313
Implement AcquireTracer and ReleaseTracer for TraceLog#2313jackc merged 2 commits intojackc:masterfrom
Conversation
- `TraceLog` now implements the `pgxpool.AcquireTracer` and `pgxpool.ReleaseTracer` interfaces to log connection pool interactions.
|
The code seems fine. But this change could have a side effect of greatly increasing the amount of log output. If someone is mostly using I'm not sure this is a desirable outcome. |
|
well, I think the additional logging would be useful if you don't have other visibility into your app. Knowing how long it took to acquire a connection is definitely helpful. Also, these log statements are pretty light; they are not like the |
I'm just thinking about how the volume of messages could be greatly increased.
Let's do that. |
TraceLognow implements thepgxpool.AcquireTracerandpgxpool.ReleaseTracerinterfaces to log connection pool interactions.