mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
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:
parent
9103457384
commit
94e56e61ba
@ -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)
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user