log

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 8 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 Error

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

func ErrorHideStack

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

func ErrorWithStack

func ErrorWithStack(msg, stack string, fields ...zap.Field)

ErrorWithStack 通过额外的堆栈信息打印错误日志

func Info

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

func SetLogDir

func SetLogDir(dir string)

SetLogDir 设置日志输出目录

func SetLogRotate added in v0.0.6

func SetLogRotate(t int)

SetLogRotate 设置日志切割时间

func SetProd

func SetProd(isProd bool)

SetProd 设置生产环境模式

func SetWriteFileWithDev added in v0.0.6

func SetWriteFileWithDev(isWrite bool)

SetWriteFileWithDev 设置开发环境下写入文件

func Warn

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

Types

type MLogger added in v0.0.10

type MLogger struct {
	*zap.Logger
}

func Logger added in v0.0.4

func Logger() *MLogger

func (*MLogger) Printf added in v0.0.10

func (slf *MLogger) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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