logger

package
v0.0.1-20230822-0002 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuickConsole

func NewQuickConsole(db *gorm.DB, r Runtime) error

func QuickScope

func QuickScope(r Runtime) func(db *gorm.DB) *gorm.DB

Types

type GormLogger

type GormLogger struct {
	Logger *model.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(
	instanceName string,
	dbType string,
	logConfig loggerConfig.Config,
) *GormLogger

func (*GormLogger) Error

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

func (*GormLogger) Info

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

func (*GormLogger) LogMode

func (*GormLogger) Trace

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

func (*GormLogger) Warn

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

type Runtime

type Runtime struct {
	InstanceName string
	DBType       string
	Level        int
}

Jump to

Keyboard shortcuts

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