logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Key string
	Val any
}

func BoolField

func BoolField(key string, val bool) Field

func DurationField

func DurationField(key string, val time.Duration) Field

func ErrorField

func ErrorField(err error) Field

func Int64Field

func Int64Field(key string, val int64) Field

func IntField

func IntField(key string, val int) Field

func StringField

func StringField(key string, val string) Field

func TimeField

func TimeField(key string, val time.Time) Field

type Logger

type Logger interface {
	Debug(msg string, fields ...Field)
	Info(msg string, fields ...Field)
	Warn(msg string, fields ...Field)
	Error(msg string, fields ...Field)
	Fatal(msg string, fields ...Field)
	Panic(msg string, fields ...Field)
}

func NewZapLogger

func NewZapLogger(l *zap.Logger) Logger

type ZapLogger

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

func (*ZapLogger) Debug

func (z *ZapLogger) Debug(msg string, fields ...Field)

func (*ZapLogger) Error

func (z *ZapLogger) Error(msg string, fields ...Field)

func (*ZapLogger) Fatal

func (z *ZapLogger) Fatal(msg string, fields ...Field)

func (*ZapLogger) Info

func (z *ZapLogger) Info(msg string, fields ...Field)

func (*ZapLogger) Panic

func (z *ZapLogger) Panic(msg string, fields ...Field)

func (*ZapLogger) Warn

func (z *ZapLogger) Warn(msg string, fields ...Field)

Jump to

Keyboard shortcuts

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