Skip to content

kataras/pgx-golog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgx-golog

build status report card godocs

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,
}

📖 Learning pgx-golog

Installation

The only requirement is the Go Programming Language.

Create a new project

$ 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 .

📝 License

This project is licensed under the MIT License.