Allows to use Logrus logger with Pgx package.
It is go gettable $ go get github.com/andygrunwald/go-trending
Just import it.
import "github.com/rassakhatsky/logrus-pgx"
And assign the logrus-pgx logger as default logger for Pgx.
var dbConfig pgx.ConnPoolConfig
dbConfig.Host = "some_host"
dbConfig.User = "some_user"
dbConfig.Password = "some_password"
dbConfig.Database = "some_db"
dbConfig.Logger = (*logrus_pgx.PgxLogger)(logrus.StandardLogger())
// or wrap an entry (*logrus_pgx.PgxEntry)(logrus.WithFields(logrus.Fields{"module": "pgx"}))
pgxPool, err := pgx.NewConnPool(pgx.ConnPoolConfig{})