logger

package
v0.0.0-...-d37ed5e Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

Debug print

func Error

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

Error print

func Fatal

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

Fatal 根据模式

func GetKitLogger

func GetKitLogger() log.Logger

GetKitLogger returns a Go kit log.Logger that sends log events to a zap.Logger.

func GetLogger

func GetLogger() *zap.Logger

GetLogger get looger

func Info

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

Info print

func InitLog

func InitLog(logFile, level string)

InitLog init

func SetLogLevel

func SetLogLevel(level string)

SetLogLevel set log level

func Warn

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

Warn print

Types

type Logger

type Logger struct {
	*zap.Logger
	io.Closer
}

Logger struct

func NewLogger

func NewLogger(logFile string, level string, defaultAtom bool) Logger

NewLogger @param defaultAtom :if use the default atom create by tb use this to create logger for different log file compatible with old one use the global variable atom,be care

Jump to

Keyboard shortcuts

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