log

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(template string, args ...interface{})

func Errorf

func Errorf(template string, args ...interface{})

func Fatalf

func Fatalf(template string, args ...interface{})

func Infof

func Infof(template string, args ...interface{})

func New

func New(o Options) *zap.Logger

func Panicf

func Panicf(template string, args ...interface{})

func SetGlobalLogger added in v0.0.2

func SetGlobalLogger(o *zap.Logger)

func Warnf

func Warnf(template string, args ...interface{})

func WithContext added in v0.0.2

func WithContext(ctx context.Context) *zap.SugaredLogger

func WithFieldContext added in v0.0.2

func WithFieldContext(ctx context.Context, fields ...any) context.Context

Types

type BuffSink

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

func (*BuffSink) Close

func (b *BuffSink) Close() error

func (*BuffSink) Sync

func (b *BuffSink) Sync() error

func (*BuffSink) Write

func (b *BuffSink) Write(p []byte) (n int, err error)

type Options

type Options struct {
	LogLeave      zapcore.Level
	To            io.Writer
	DisableTime   bool
	DisableLevel  bool
	DisableCaller bool
	TimeLayout    string
	CallerSkip    int
	Name          string
}

Jump to

Keyboard shortcuts

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