zap

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdLogger logger.Logger

Functions

This section is empty.

Types

type Option

type Option func(l *Options)

func WithCallerSkip

func WithCallerSkip(skip int) Option

func WithErrorWriter

func WithErrorWriter(w io.Writer) Option

func WithInfoWriter

func WithInfoWriter(w io.Writer) Option

func WithLevel

func WithLevel(l string) Option

func WithModule

func WithModule(module string) Option

func WithServiceName

func WithServiceName(serviceName string) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type ZapLogger

type ZapLogger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(options ...Option) (l *ZapLogger, err error)

func (*ZapLogger) Close

func (l *ZapLogger) Close() error

func (*ZapLogger) DPanic added in v1.0.11

func (l *ZapLogger) DPanic(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) Debug

func (l *ZapLogger) Debug(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) Error

func (l *ZapLogger) Error(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) Fatal

func (l *ZapLogger) Fatal(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) GetLevel

func (l *ZapLogger) GetLevel() logger.Level

func (*ZapLogger) Info

func (l *ZapLogger) Info(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) Panic added in v1.0.11

func (l *ZapLogger) Panic(ctx context.Context, msg string, fields ...logger.Field)

func (*ZapLogger) Warn

func (l *ZapLogger) Warn(ctx context.Context, msg string, fields ...logger.Field)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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