v5

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPgxLogLevel

func ToPgxLogLevel(v apexlogutils.Verbosity) tracelog.LogLevel

ToPgxLogLevel gets the pgx log level from Verbosity

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger holds an Apex log instance

func NewLogger

func NewLogger(logger log.Interface, opts ...LoggerOpt) *Logger

NewLogger builds a new logger instance for pgx given an Apex log instance

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, level tracelog.LogLevel, msg string, data map[string]interface{})

Log a pgx log message to the underlying log instance, implements pgx.Logger

type LoggerOpt

type LoggerOpt func(*Logger)

LoggerOpt sets options for the logger

func WithIgnoreErrors

func WithIgnoreErrors(matcher func(err error) bool) LoggerOpt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL