logger

package
v0.0.0-...-8f08b9d Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug func(msg string, fields ...zap.Field)

Debug - log to debug level

View Source
var Error func(msg string, fields ...zap.Field)

Error - log to error level

View Source
var Fatal func(msg string, fields ...zap.Field)

Fatal - log to Fatal level

View Source
var Info func(msg string, fields ...zap.Field)

Info - log to info level

View Source
var (

	// Log is global logger
	Log *zap.Logger
)
View Source
var LogLevels = map[string]int{
	"debug":  -1,
	"info":   0,
	"warn":   1,
	"error":  2,
	"dpanic": 3,
	"panic":  4,
	"fatal":  5,
}

LogLevels is global log level: Debug(-1), Info(0), Warn(1), Error(2), DPanic(3), Panic(4), Fatal(5)

View Source
var Warn func(msg string, fields ...zap.Field)

Warn - log to warn level

Functions

func CreateLogger

func CreateLogger(lvl int, logOutputPath string) (*zap.Logger, error)

Init initializes log by input parameters lvl - global log level: Debug(-1), Info(0), Warn(1), Error(2), DPanic(3), Panic(4), Fatal(5)

func Init

func Init(level, output string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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