logger

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessLogger *zap.Logger
View Source
var RecoveryLogger *zap.Logger

Functions

func InitAccessLogger

func InitAccessLogger(basePath string)

func InitRecoveryLogger

func InitRecoveryLogger(basePath string)

func InitServerLogger

func InitServerLogger(basePath string)

func RecoveryWithZap

func RecoveryWithZap(logger *zap.Logger, stack bool) gin.HandlerFunc

Types

type Logger added in v0.0.12

type Logger struct {
	ZapLogger *zap.Logger
	LogConfig gorm_logger.Config
}

func NewSqlLogger added in v0.0.12

func NewSqlLogger(zapLogger *zap.Logger, logConfig gorm_logger.Config) Logger

func (Logger) Error added in v0.0.12

func (l Logger) Error(ctx context.Context, str string, args ...interface{})

func (Logger) Info added in v0.0.12

func (l Logger) Info(ctx context.Context, str string, args ...interface{})

func (Logger) LogMode added in v0.0.12

func (l Logger) LogMode(level gorm_logger.LogLevel) gorm_logger.Interface

func (Logger) Trace added in v0.0.12

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

func (Logger) Warn added in v0.0.12

func (l Logger) Warn(ctx context.Context, str string, args ...interface{})

Jump to

Keyboard shortcuts

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