simplelogger

package module
v0.0.0-...-962af38 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 7 Imported by: 28

README

go-simplelogger

a simple logger wrapper based on zap.Logger

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DebugLevel level
	DebugLevel = Level(zap.DebugLevel)
	// InfoLevel level
	InfoLevel = Level(zap.InfoLevel)
	// WarnLevel level
	WarnLevel = Level(zap.WarnLevel)
	// ErrorLevel level
	ErrorLevel = Level(zap.ErrorLevel)
	// PanicLevel level
	PanicLevel = Level(zap.PanicLevel)
	// FatalLevel level
	FatalLevel = Level(zap.FatalLevel)
)

Functions

func AssertEqual

func AssertEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool

func AssertEqualf

func AssertEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func AssertFalse

func AssertFalse(value bool, msgAndArgs ...interface{}) bool

func AssertFalsef

func AssertFalsef(value bool, msg string, args ...interface{}) bool

func AssertNil

func AssertNil(object interface{}, msgAndArgs ...interface{}) bool

func AssertNilF

func AssertNilF(object interface{}, msg string, args ...interface{}) bool

func AssertNotNil

func AssertNotNil(object interface{}, msgAndArgs ...interface{}) bool

func AssertNotNilF

func AssertNotNilF(object interface{}, msg string, args ...interface{}) bool

func AssertTrue

func AssertTrue(value bool, msgAndArgs ...interface{}) bool

func AssertTruef

func AssertTruef(value bool, msg string, args ...interface{}) bool

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func FatalIfError

func FatalIfError(err error, args ...interface{})

func Fatalf

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

func FatalfIfError

func FatalfIfError(err error, format string, args ...interface{})

func Infof

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

func Panic

func Panic(args ...interface{})

func PanicIfError

func PanicIfError(err error, args ...interface{})

func Panicf

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

func PanicfIfError

func PanicfIfError(err error, format string, args ...interface{})

func SetLevel

func SetLevel(lv Level)

SetLevel sets the log level

func SetOutput

func SetOutput(outputs []string)

SetOutput sets the output writer

func TraceError

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

TraceError prints the stack and error

func Warnf

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

Types

type Level

type Level = zapcore.Level

Level is type of log levels

func GetLevel

func GetLevel() Level

GetLevel get the current log level

func ParseLevel

func ParseLevel(s string) Level

ParseLevel converts string to Levels

Jump to

Keyboard shortcuts

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