logger

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestMode bool

TestMode is a flag for testing mode

Functions

func CaptureZapOutput added in v0.1.10

func CaptureZapOutput(funcToRun func()) string

CaptureZapOutput returns output of zap logger so that it can be used in tests

func Debug

func Debug(m M)

Debug logs with debug level

func EnableTestingMode added in v0.1.10

func EnableTestingMode()

EnableTestingMode set zap for testing, should be called before CaptureZapOutput

func Error

func Error(m M)

Error logs with error level

func Info

func Info(m M)

Info logs with info level

func Setup

func Setup(dbg bool) (err error)

Setup initialize logger

func Warn

func Warn(m M)

Warn logs with warn level

Types

type M

type M struct {
	Msg string // the message
	DId int    // directive ID
	BId string // backlog ID
	CId uint64 // conn ID
}

M defines the type for log messages

Jump to

Keyboard shortcuts

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