logger

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

func Debugf

func Debugf(msg string, args ...interface{})

func Error

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

func Errorf

func Errorf(msg string, args ...interface{})

func Fatal

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

func Fatalf

func Fatalf(msg string, args ...interface{})

func Info

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

func Infof

func Infof(msg string, args ...interface{})

func InitLogger

func InitLogger(release string, config *LogConfigure)

InitLogger - 初始化日志.

func Sync

func Sync()

func Warn

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

func Warnf

func Warnf(msg string, args ...interface{})

Types

type LogConfigure

type LogConfigure struct {
	Level       string `yaml:"level" json:"level" comment:"日志级别"`
	FilePath    string `yaml:"file_path" json:"file_path" comment:"日志文件保存路径"`
	FileMaxSize int    `yaml:"file_max_size" json:"file_max_size" comment:"日志分割前大小MB"`
	FileMaxAge  int    `yaml:"file_max_age" json:"file_max_age" comment:"日志分割前天数days"`
}

func NewLogConfigure

func NewLogConfigure() *LogConfigure

NewLogConfigure -

Jump to

Keyboard shortcuts

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