mlog

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZapLog *zap.Logger

ZapLog zap日志对象

Functions

func SetLevel

func SetLevel(level zapcore.Level) error

SetLevel 设置日志等级

func SetToFile added in v0.0.14

func SetToFile(path string)

SetToFile 设置写入文件

func SetToProd

func SetToProd() error

SetToProd 设置为生产环境

Types

type LoggerAble

type LoggerAble interface {
	Debugf(template string, args ...interface{})
	Infof(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
	Fatalf(template string, args ...interface{})
}

LoggerAble 日志对象接口

var Log LoggerAble

Log 对外服务的日志对象

Jump to

Keyboard shortcuts

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