logger

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	shared.Reference
	Name string
	// contains filtered or unexported fields
}

func Default

func Default() *Adapter

func NewLogger

func NewLogger(name string, logger Logger) *Adapter

func (*Adapter) ColumnsDetection

func (l *Adapter) ColumnsDetection(sql, source string)

func (*Adapter) Inherit

func (l *Adapter) Inherit(adapter *Adapter)

func (*Adapter) Log added in v0.8.0

func (l *Adapter) Log(message string, args ...interface{})

func (*Adapter) LogDatabaseErr added in v0.2.7

func (l *Adapter) LogDatabaseErr(ctx context.Context, view string, SQL string, err error, args ...interface{})

func (*Adapter) ObjectReconciling

func (l *Adapter) ObjectReconciling(dst, item, parent interface{}, index int)

func (*Adapter) ReadTime

func (l *Adapter) ReadTime(viewName string, start, end *time.Time, err error)

func (*Adapter) ReadingData

func (l *Adapter) ReadingData(duration time.Duration, SQL string, read int, params []interface{}, err error)

type AdapterIndex

type AdapterIndex map[string]*Adapter

func (AdapterIndex) Lookup

func (i AdapterIndex) Lookup(name string) (*Adapter, bool)

func (AdapterIndex) Register

func (i AdapterIndex) Register(adapter *Adapter)

type Adapters

type Adapters []*Adapter

func (Adapters) Index

func (a Adapters) Index() AdapterIndex

type ColumnsDetection

type ColumnsDetection func(sql, source string)

type Counter

type Counter interface {
	Begin(started time.Time) counter.OnDone
	DecrementValue(value interface{}) int64
	IncrementValue(value interface{}) int64
}

type CounterAdapter

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

func NewCounter

func NewCounter(counter Counter) *CounterAdapter

func (*CounterAdapter) Begin

func (c *CounterAdapter) Begin(started time.Time) counter.OnDone

func (*CounterAdapter) Counter added in v0.8.0

func (c *CounterAdapter) Counter() Counter

func (*CounterAdapter) DecrementValue

func (c *CounterAdapter) DecrementValue(value interface{}) int64

func (*CounterAdapter) IncrementValue

func (c *CounterAdapter) IncrementValue(value interface{}) int64

type Log added in v0.2.7

type Log func(message string, args ...interface{})

type Logger

type Logger interface {
	ColumnsDetection() ColumnsDetection
	ObjectReconciling() ObjectReconciling
	ReadingData() ReadingData
	ViewReadTime() ReadTime
	OverallReadTime() ReadTime
	Log() Log
}

type ObjectReconciling

type ObjectReconciling func(dst, item, parent interface{}, index int)

type ReadTime

type ReadTime func(viewName string, start *time.Time, end *time.Time, err error)

type ReadingData

type ReadingData func(duration time.Duration, sql string, read int, params []interface{}, err error)

type TimeLogger

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

func NewTimeLogger

func NewTimeLogger(view, global time.Duration) *TimeLogger

func (*TimeLogger) ColumnsDetection

func (t *TimeLogger) ColumnsDetection() ColumnsDetection

func (*TimeLogger) Log added in v0.2.7

func (t *TimeLogger) Log() Log

func (*TimeLogger) ObjectReconciling

func (t *TimeLogger) ObjectReconciling() ObjectReconciling

func (*TimeLogger) OverallReadTime

func (t *TimeLogger) OverallReadTime() ReadTime

func (*TimeLogger) ReadingData

func (t *TimeLogger) ReadingData() ReadingData

func (*TimeLogger) ViewReadTime

func (t *TimeLogger) ViewReadTime() ReadTime

Jump to

Keyboard shortcuts

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