logger

package
v1.3.40 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanic added in v1.3.14

func DPanic(msg string, fields ...zap.Field)

func Debug added in v1.3.14

func Debug(msg string, fields ...zap.Field)

func Default added in v1.3.14

func Default() *zap.Logger

func Error added in v1.3.14

func Error(msg string, fields ...zap.Field)

func Fatal added in v1.3.14

func Fatal(msg string, fields ...zap.Field)

func GetLoggerDir

func GetLoggerDir() string

func Info added in v1.3.14

func Info(msg string, fields ...zap.Field)

func NewGormLogger added in v1.2.0

func NewGormLogger(name string, slowThreshold time.Duration, level gormless.LogLevel, sender GormLogSender) gormless.Interface

func NewLogger added in v1.2.10

func NewLogger(file string, opts ...Option) *zap.Logger

func Panic added in v1.3.14

func Panic(msg string, fields ...zap.Field)

func RedirectStdLog added in v1.3.24

func RedirectStdLog(log *zap.Logger)

func SetDefault added in v1.3.14

func SetDefault(log *zap.Logger)

func SetLoggerDir

func SetLoggerDir(dir string)

func Use

func Use(filename string, opts ...Option) *zap.Logger

func Warn added in v1.3.14

func Warn(msg string, fields ...zap.Field)

func With added in v1.3.14

func With(fields ...zap.Field) *zap.Logger

func WithOptions added in v1.3.14

func WithOptions(opts ...zap.Option) *zap.Logger

Types

type GormLogSender added in v1.2.0

type GormLogSender interface {
	Push(string)
	Open() bool
	Always() bool
}

type Option added in v1.3.14

type Option func(c *config)

func WithCompress added in v1.3.16

func WithCompress(b bool) Option

func WithLocalTime added in v1.3.16

func WithLocalTime(b bool) Option

func WithMaxAge added in v1.3.16

func WithMaxAge(s int) Option

func WithMaxBackups added in v1.3.16

func WithMaxBackups(b int) Option

func WithMaxSize added in v1.3.16

func WithMaxSize(s int) Option

Jump to

Keyboard shortcuts

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