zapx

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel string = "DEBUG"
	InfoLevel  string = "INFO"
	WarnLevel  string = "WARN"
	ErrorLevel string = "ERROR"
	FatalLevel string = "FATAL"
)

Variables

Functions

func MustCreateLogger

func MustCreateLogger() *zap.SugaredLogger

func NewLogger

func NewLogger(options LoggerOptions) (*zap.SugaredLogger, error)

NewLogger creates a new Logger instance

Types

type LogLevel

type LogLevel string

func (LogLevel) String

func (l LogLevel) String() string

type LoggerOptions

type LoggerOptions struct {
	Level       string
	LogJSON     bool
	Development bool
	Stacktrace  bool
}

LoggerOptions are options for constructing a Logger

Jump to

Keyboard shortcuts

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