pgx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 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) pgx.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 pgx.LogLevel, msg string, data map[string]interface{})

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

type LoggerOpt added in v0.2.0

type LoggerOpt func(*Logger)

LoggerOpt sets options for the logger

func WithIgnoreErrors added in v0.2.0

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