Free golog and pgx logging integration.
import "github.com/jackc/pgx/v5/tracelog"
import pgxgolog "github.com/kataras/pgx-golog"
// [...]
logger := pgxgolog.NewLogger(yourGologLoggerInstanceHere)
tracer := &tracelog.TraceLog{
Logger: logger,
LogLevel: tracelog.LogLevelTrace,
}
The only requirement is the Go Programming Language.
$ mkdir myapp
$ cd myapp
$ go mod init myapp
$ go get github.com/kataras/pgx-golog
Install on existing project
$ cd myapp
$ go get github.com/kataras/pgx-golog
Run
$ go mod tidy
$ go run .
This project is licensed under the MIT License.