golog

package
v0.0.0-...-2be15ab Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MulanPSL-2.0 Imports: 15 Imported by: 0

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 GoInfo

func GoInfo(prompt string, item any)

func Info

func Info(v ...any)

func InfoDb

func InfoDb(v ...interface{})

func InfoEs

func InfoEs(v ...interface{})

func Ini2JsonStr

func Ini2JsonStr(v ...any)

func InitLogrus

func InitLogrus()

func InjectDbfileLogger

func InjectDbfileLogger(s *DbfileLogger)

func InjectGoLog

func InjectGoLog(s *GoLog)

func LoadDbfileLogger

func LoadDbfileLogger() baseiface.ISingleton

func LoadGoLog

func LoadGoLog() baseiface.ISingleton

func Println

func Println(v ...interface{})

func Stat

func Stat(v ...interface{})

func StatInfo

func StatInfo(v ...interface{})

func StdTextProc

func StdTextProc(v ...any) string

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{})

type GoLog

type GoLog struct {
	basedto.BaseEntitySingle
}

func FindBeanGoLog

func FindBeanGoLog() *GoLog

FindBeanGoLog

func NewGoLog

func NewGoLog() *GoLog

func (GoLog) Debuf

func (self GoLog) Debuf(v ...interface{})

func (GoLog) Debug

func (self GoLog) Debug(v ...interface{})

func (GoLog) Error

func (self GoLog) Error(v ...interface{})

func (GoLog) Errorf

func (self GoLog) Errorf(v ...interface{})

func (GoLog) Info

func (self GoLog) Info(v ...interface{})

func (GoLog) Infof

func (self GoLog) Infof(v ...interface{})

Jump to

Keyboard shortcuts

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