log

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatLogger

type FormatLogger interface {
	Tracef(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Noticef(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	Fatalf(format string, v ...interface{})
}

type GormLogger

type GormLogger struct {
	LogLevel                  gormL.LogLevel
	IgnoreRecordNotFoundError bool
	Colorful                  bool
	SlowThreshold             time.Duration
	LogLevelHook              func(gormL.LogLevel)
	// contains filtered or unexported fields
}

func NewGormLogger

func NewGormLogger() *GormLogger

func (GormLogger) Error

func (l GormLogger) Error(_ context.Context, str string, args ...interface{})

func (GormLogger) Info

func (l GormLogger) Info(_ context.Context, str string, args ...interface{})

func (GormLogger) LogMode

func (l GormLogger) LogMode(level gormL.LogLevel) gormL.Interface

func (GormLogger) Trace

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

func (GormLogger) Warn

func (l GormLogger) Warn(_ context.Context, str string, args ...interface{})

type Logger

type Logger interface {
	Trace(v ...interface{})
	Debug(v ...interface{})
	Info(v ...interface{})
	Notice(v ...interface{})
	Warn(v ...interface{})
	Error(v ...interface{})
	Fatal(v ...interface{})
}

type SLogger

type SLogger interface {
	Logger
	FormatLogger
}

func DefaultLog

func DefaultLog() SLogger

Jump to

Keyboard shortcuts

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