logger

package
v0.0.0-...-7a011cc Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SugaredLogger *zap.SugaredLogger
	Env           string
	DingUrl       string
)

Functions

func Debug

func Debug(args ...interface{})

Debug fmt.Sprintf to log a templated message.

func Debugf

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

Debugf fmt.Sprintf to log a templated message.

func Error

func Error(args ...interface{})

Error uses fmt.Sprintf to log a templated message.

func Errorf

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

Errorf uses fmt.Sprintf to log a templated message.

func Info

func Info(args ...interface{})

Info uses fmt.Sprintf to log a templated message.

func Infof

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

Infof uses fmt.Sprintf to log a templated message.

func InitLogger

func InitLogger(conf *LogConfig, env, dingUrl string) error

func SendMonitor2DingDing

func SendMonitor2DingDing(args string)

func Warn

func Warn(args ...interface{})

Warn uses fmt.Sprintf to log a templated message.

func Warnf

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

Warnf uses fmt.Sprintf to log a templated message.

func ZnTimeEncoder

func ZnTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

Types

type LogConfig

type LogConfig struct {
	LogLevel string
	LogFile  string
	IsDebug  int //0-not debug(output only file)  1-debug (output either file and stdout )
}

Jump to

Keyboard shortcuts

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