logger

package
v0.0.0-...-4044053 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithFxLogger = fx.WithLogger(NewFxLogger)
View Source
var WithLogger = fx.Provide(NewLogger)

Functions

func NewFxLogger

func NewFxLogger(logging *log.Logger) fxevent.Logger

func NewGinLogger

func NewGinLogger(logger *log.Logger) gin.HandlerFunc

func NewLogger

func NewLogger() *log.Logger

func NewLoggerFactory

func NewLoggerFactory(level log.Level) func() *log.Logger

func WithLoggerFactory

func WithLoggerFactory(level log.Level) fx.Option

Types

type GormLogger

type GormLogger struct {
	Logger *log.Logger
}

func NewGormLogger

func NewGormLogger(logger *log.Logger) *GormLogger

func (*GormLogger) Error

func (g *GormLogger) Error(ctx context.Context, s string, opts ...interface{})

func (*GormLogger) Info

func (g *GormLogger) Info(ctx context.Context, s string, opts ...interface{})

func (*GormLogger) LogMode

func (g *GormLogger) LogMode(ll glogger.LogLevel) glogger.Interface

func (*GormLogger) Trace

func (g *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*GormLogger) Warn

func (g *GormLogger) Warn(ctx context.Context, s string, opts ...interface{})

Jump to

Keyboard shortcuts

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