golog

package
v0.0.0-...-e3601d1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MulanPSL-2.0 Imports: 13 Imported by: 141

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Error

func Error(v ...interface{})

func ErrorDb

func ErrorDb(v ...interface{})

func ErrorEs

func ErrorEs(v ...interface{})

func Info

func Info(v ...interface{})

func InfoDb

func InfoDb(v ...interface{})

func InfoEs

func InfoEs(v ...interface{})

func InitLogrus

func InitLogrus()

func InjectDbfileLogger

func InjectDbfileLogger(s *DbfileLogger)

func LoadDbfileLogger

func LoadDbfileLogger() baseiface.ISingleton

func LogInfo

func LogInfo(args ...interface{})

func Println

func Println(v ...interface{})

func Stat

func Stat(v ...interface{})

func StatInfo

func StatInfo(v ...interface{})

func Warn

func Warn(v ...interface{})

Types

type DbfileLogger

type DbfileLogger struct {
	basedto.BaseEntitySingle
	// contains filtered or unexported fields
}

自定义 Logger 结构体,实现 gorm.io/gorm/logger.Interface

func FindBeanDbfileLogger

func FindBeanDbfileLogger() *DbfileLogger

FindBeanDbfileLogger

func NewDbfileLogger

func NewDbfileLogger() *DbfileLogger

func NewFileLogger

func NewFileLogger(filePath string) (*DbfileLogger, error)

func (*DbfileLogger) Error

func (l *DbfileLogger) Error(ctx context.Context, msg string, data ...interface{})

func (*DbfileLogger) Info

func (l *DbfileLogger) Info(ctx context.Context, msg string, data ...interface{})

其他方法按需实现(可留空或简单处理)

func (*DbfileLogger) Print

func (self *DbfileLogger) Print(v ...any)

func (*DbfileLogger) Trace

func (l *DbfileLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

实现 Trace 方法(记录 SQL)

func (*DbfileLogger) TraceEnd

func (l *DbfileLogger) TraceEnd(ctx context.Context, begin time.Time, err error)

func (*DbfileLogger) TraceStart

func (l *DbfileLogger) TraceStart(ctx context.Context, begin time.Time, fc func() (string, int64)) context.Context

func (*DbfileLogger) Warn

func (l *DbfileLogger) Warn(ctx context.Context, msg string, data ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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