logger

package
v0.0.0-...-acaaaf6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *zap.SugaredLogger

GetLogger returns a configured instance of the logger

Types

type ExporterLogger

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

ExporterLogger wraps sugared logged into an interface compatible for Wails

func GetExporterLogger

func GetExporterLogger(path string) *ExporterLogger

GetExporterLogger returns a configured instance of the logger (used by the UI)

func (*ExporterLogger) Debug

func (logger *ExporterLogger) Debug(message string)

func (*ExporterLogger) Error

func (logger *ExporterLogger) Error(message string)

func (*ExporterLogger) Fatal

func (logger *ExporterLogger) Fatal(message string)

func (*ExporterLogger) Info

func (logger *ExporterLogger) Info(message string)

func (*ExporterLogger) Print

func (logger *ExporterLogger) Print(string)

func (*ExporterLogger) Trace

func (logger *ExporterLogger) Trace(string)

func (*ExporterLogger) Warning

func (logger *ExporterLogger) Warning(message string)

type GormLogger

type GormLogger struct {
	*zap.SugaredLogger

	SlowThreshold time.Duration
}

GormLogger wraps logger with some gorm specific functionality

func (GormLogger) Error

func (l GormLogger) Error(_ context.Context, msg string, data ...interface{})

Error print error messages.

func (GormLogger) Info

func (l GormLogger) Info(_ context.Context, msg string, data ...interface{})

Info print info.

func (*GormLogger) LogMode

LogMode log mode.

func (GormLogger) Trace

func (l GormLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)

Trace print sql message.

func (GormLogger) Warn

func (l GormLogger) Warn(_ context.Context, msg string, data ...interface{})

Warn print warn messages.

Jump to

Keyboard shortcuts

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