Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopQueryLogger

type NoopQueryLogger struct{}

func (NoopQueryLogger) Log

func (NoopQueryLogger) Log(_ time.Time, _ string, _ []any)

type QueryLogEntry

type QueryLogEntry struct {
	Timestamp    time.Time `json:"ts"`
	Query        string    `json:"query"`
	Params       []any     `json:"params"`
	DurationNano int64     `json:"duration_nano"`
}

type QueryLogger

type QueryLogger interface {
	Log(startTime time.Time, query string, params []any)
}

func StartQueryLogger

func StartQueryLogger(ctx context.Context, p string, includeParams bool) (QueryLogger, error)

Jump to

Keyboard shortcuts

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