TraceLog implements pgx.QueryTracer, pgx.BatchTracer, pgx.ConnectTracer, pgx.CopyFromTracer, pgxpool.AcquireTracer, and pgxpool.ReleaseTracer. Logger and LogLevel are required. Config will be automatically initialized on the first use if nil.
| 135 | // and pgxpool.ReleaseTracer. Logger and LogLevel are required. Config will be automatically initialized on the |
| 136 | // first use if nil. |
| 137 | type TraceLog struct { |
| 138 | Logger Logger |
| 139 | LogLevel LogLevel |
| 140 | |
| 141 | Config *TraceLogConfig |
| 142 | ensureConfigOnce sync.Once |
| 143 | } |
| 144 | |
| 145 | // ensureConfig initializes the Config field with default values if it is nil. |
| 146 | func (tl *TraceLog) ensureConfig() { |
nothing calls this directly
no outgoing calls
no test coverage detected