logger

package
v0.0.0-...-397de4e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: GPL-3.0 Imports: 5 Imported by: 42

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 LoggerI) error

Cleanup ...

Types

type Field

type Field = zapcore.Field

Field ...

type LoggerI

type LoggerI 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 LoggerI, name string) LoggerI

GetNamed ...

func NewLogger

func NewLogger(namespace string, level string) LoggerI

NewLogger ...

func WithFields

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

WithFields ...

Jump to

Keyboard shortcuts

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