mirror of https://github.com/jackc/pgx.git
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>pull/1807/head
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…
Reference in New Issue