MCPcopy
hub / github.com/jackc/pgx / TraceLog

Struct TraceLog

tracelog/tracelog.go:137–143  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

135// and pgxpool.ReleaseTracer. Logger and LogLevel are required. Config will be automatically initialized on the
136// first use if nil.
137type 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.
146func (tl *TraceLog) ensureConfig() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected