logger

package
v0.0.0-...-bdf9744 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LevelDebug ...
	LevelDebug = "debug"
	// LevelInfo ...
	LevelInfo = "info"
	// LevelWarn ...
	LevelWarn = "warn"
	// LevelError ...
	LevelError = "error"
	// LevelDPanic ...
	LevelDPanic = "dpanic"
	// LevelPanic ...
	LevelPanic = "panic"
	// LevelFatal ...
	LevelFatal = "fatal"
)

Variables

View Source
var (
	// Int ..
	Int = zap.Int
	// String ...
	String = zap.String
	// Error ...
	Error = zap.Error
	// Bool ...
	Bool = zap.Bool
	// Any ...
	Any = zap.Any
)

Functions

func Cleanup

func Cleanup(l Logger) error

Cleanup ...

Types

type Field

type Field = zapcore.Field

Field ...

type Logger

type Logger interface {
	Debug(msg string, fields ...Field)
	Info(msg string, fields ...Field)
	Warn(msg string, fields ...Field)
	Error(msg string, fields ...Field)
	DPanic(msg string, fields ...Field)
	Panic(msg string, fields ...Field)
	Fatal(msg string, fields ...Field)
}

Logger ...

func GetNamed

func GetNamed(l Logger, name string) Logger

GetNamed ...

func New

func New(namespace string, level string) Logger

New ...

func WithFields

func WithFields(l Logger, fields ...Field) Logger

WithFields ...

Jump to

Keyboard shortcuts

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