logger

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KFile    = "file"
	KLine    = "line"
	LDebug   = zapcore.DebugLevel
	LInfo    = zapcore.InfoLevel
	LWarning = zapcore.WarnLevel
	LError   = zapcore.ErrorLevel
	LFatal   = zapcore.FatalLevel
)

Variables

This section is empty.

Functions

func Flush

func Flush()

func FromContext

func FromContext(ctx context.Context, opts ...Option) *zap.Logger

func New

func New(opts ...Option) *zap.Logger

func SetLevel

func SetLevel(level Level)

Types

type Level

type Level = zapcore.Level

type Option

type Option func(options *Options)

func Decorate

func Decorate(fn func(string) string) Option

func Fields

func Fields(fields ...zap.Field) Option

func Named

func Named(name string) Option

func SkipCallFrame

func SkipCallFrame(count int) Option

type Options

type Options struct {
	SkipCallFrame   int
	Name            string
	NamingDecorator func(string) string
	Fields          []zap.Field
}

Jump to

Keyboard shortcuts

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