logger

package
v0.0.0-...-3f48d72 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error) bool

CheckError check error is nil or not

func CheckFatal

func CheckFatal(err error) bool

CheckFatal check error is nil or not

func CheckRedisError

func CheckRedisError(err error) bool

CheckRedisError this doesn't play well with zap

func Debug

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

Debug logs a debug message with the given fields

func Error

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

Error logs a debug message with the given fields

func Fatal

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

Fatal logs a message than calls os.Exit(1)

func GetLogger

func GetLogger() *zap.Logger

GetLogger returns zap logger instance

func Info

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

Info logs a debug message with the given fields

func InitLogger

func InitLogger()

InitLogger initializes a thread-safe singleton logger This would be called from a main method when the application starts up This function would ideally, take zap configuration, but is left out in favor of simplicity using the example logger.

func Warn

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

Warn logs a debug message with the given fields

Types

This section is empty.

Jump to

Keyboard shortcuts

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