Fix usage of logger in stdlib docs

The documentation previously showed the old way of logging and not the
newer tracer adapter. This patch updates the example to build correctly
with pgx/v5.

Signed-off-by: Sam Whited <sam@samwhited.com>
This commit is contained in:
Sam Whited 2023-11-21 07:59:46 -05:00 committed by Jack Christensen
parent 9103457384
commit 94e56e61ba

View File

@ -31,7 +31,7 @@
// with sql.Open.
//
// connConfig, _ := pgx.ParseConfig(os.Getenv("DATABASE_URL"))
// connConfig.Logger = myLogger
// connConfig.Tracer = &tracelog.TraceLog{Logger: myLogger, LogLevel: tracelog.LogLevelInfo}
// connStr := stdlib.RegisterConnConfig(connConfig)
// db, _ := sql.Open("pgx", connStr)
//