dblog

package
v0.0.13-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseLogger

type DatabaseLogger interface {
	Log(context.Context, sqldblogger.Level, string, map[string]interface{})
	Record(func()) string
	SetRecord(bool)
	FormatRecords() string
	ToggleLogger(bool)
}

type Handler

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

func NewHandler

func NewHandler(syntaxHighlighting bool) *Handler

func (*Handler) FormatRecords

func (l *Handler) FormatRecords() string

func (*Handler) Log

func (l *Handler) Log(_ context.Context, _ sqldblogger.Level, _ string, data map[string]interface{})

func (*Handler) Record

func (l *Handler) Record(f func()) string

func (*Handler) Reset

func (l *Handler) Reset()

func (*Handler) SetRecord

func (l *Handler) SetRecord(v bool)

func (*Handler) ToggleLogger

func (l *Handler) ToggleLogger(b bool)

Jump to

Keyboard shortcuts

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