log

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func With

func With(ctx context.Context, fields ...zap.Field) context.Context

Types

type DynamicFields

type DynamicFields func(ctx context.Context) []zap.Field

type FieldLogger added in v0.0.17

type FieldLogger struct {
	Logger *Logger
}

func (*FieldLogger) Log added in v0.0.17

func (f *FieldLogger) Log(keyvals ...interface{})

type Logger

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

func New

func New(root *zap.Logger) *Logger

func (*Logger) Debug

func (l *Logger) Debug(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) DynamicFields

func (l *Logger) DynamicFields(dynamicFields ...DynamicFields) *Logger

func (*Logger) Error

func (l *Logger) Error(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) IfErr

func (l *Logger) IfErr(err error) *Logger

func (*Logger) Info

func (l *Logger) Info(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Panic

func (l *Logger) Panic(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Warn

func (l *Logger) Warn(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) With

func (l *Logger) With(fields ...zap.Field) *Logger

Jump to

Keyboard shortcuts

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