log

package
v0.0.0-...-91c7ab2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

func Error

func Error(format string, v ...interface{})

func GetLogInst

func GetLogInst() *zap.Logger

func GetLogLevel

func GetLogLevel() zapcore.Level

func GetLogWriter

func GetLogWriter() io.Writer

func Info

func Info(format string, v ...interface{})

func InitLog

func InitLog(logFile string, conf Conf)

func ParseLogLevel

func ParseLogLevel(level string) zapcore.Level

func ReloadLogLevel

func ReloadLogLevel(level string)

func Warn

func Warn(format string, v ...interface{})

Types

type Conf

type Conf struct {
	LogWay     string //console or 日志文件,默认为日志文件
	EncoderWay string //json or console,默认为console
	LogLevel   string
	LogPath    string //文件日志路径,默认需要为./
	MaxDays    int
	MaxSize    int //单位M
}

Jump to

Keyboard shortcuts

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