mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-12-23 10:17:32 +01:00
23 lines
395 B
Go
23 lines
395 B
Go
|
package logg
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/jackc/pgx/v5/tracelog"
|
||
|
"github.com/zerodha/logf"
|
||
|
)
|
||
|
|
||
|
type PgxLogg struct {
|
||
|
logg *logf.Logger
|
||
|
}
|
||
|
|
||
|
func NewPgxTraceLogg(lo logf.Logger) PgxLogg {
|
||
|
return PgxLogg{
|
||
|
logg: &lo,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l PgxLogg) Log(ctx context.Context, level tracelog.LogLevel, msg string, data map[string]any) {
|
||
|
l.logg.Debug("pgx", "level", level, "msg", msg, "data", data)
|
||
|
}
|