logger

package
v2.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulatedSql

func PopulatedSql(query string, args ...interface{}) string

Types

type SqlLogger

type SqlLogger struct {
	Logger zerolog.Logger
}

func NewSqlLogger

func NewSqlLogger(opts ...SqlLoggerOption) SqlLogger

func (SqlLogger) Enable

func (receiver SqlLogger) Enable() bool

func (SqlLogger) Log

func (receiver SqlLogger) Log(ctx context.Context, query string, args ...interface{})

func (SqlLogger) LogWithErr

func (receiver SqlLogger) LogWithErr(ctx context.Context, err error, hit *bool, query string, args ...interface{})

type SqlLoggerOption

type SqlLoggerOption func(logger *SqlLogger)

func WithLogger

func WithLogger(logger zerolog.Logger) SqlLoggerOption

Jump to

Keyboard shortcuts

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