zapxbun

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogQueryHook

func NewLogQueryHook(log *zap.Logger) bun.QueryHook

Types

type LogQueryHook

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

LogQueryHook implements bun query hook that logs queries.

func (*LogQueryHook) AfterQuery

func (l *LogQueryHook) AfterQuery(_ context.Context, event *bun.QueryEvent)

func (*LogQueryHook) BeforeQuery

func (l *LogQueryHook) BeforeQuery(ctx context.Context, _ *bun.QueryEvent) context.Context

type Logger

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

Logger implements github.com/uptrace/bun logger.

func NewLogger

func NewLogger(log *zap.Logger) *Logger

func (*Logger) Printf

func (a *Logger) Printf(format string, args ...any)

Jump to

Keyboard shortcuts

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