logger

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: GPL-3.0 Imports: 5 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message string, fields ...zap.Field)

func Debugf

func Debugf(message string, fields ...interface{})

func Default added in v0.2.12

func Default()

func DefaultZap

func DefaultZap(isProduction bool, logFile string, level zapcore.Level)

func Error

func Error(message string, fields ...zap.Field)

func ErrorErr

func ErrorErr(message string, err error)

func ErrorIfErr added in v0.0.29

func ErrorIfErr(message string, err error)

func Errorf

func Errorf(message string, fields ...interface{})

func Info

func Info(message string, fields ...zap.Field)

func InfoIfTrue added in v0.0.29

func InfoIfTrue(condition bool, message string, fields ...zap.Field)

func Infof

func Infof(message string, fields ...interface{})

func UseZap

func UseZap(logger *zap.Logger)

func Warn

func Warn(message string, fields ...zap.Field)

func WarnErr

func WarnErr(message string, err error)

func WarnIfTrue added in v0.0.29

func WarnIfTrue(condition bool, message string, fields ...zap.Field)

func Warnf

func Warnf(message string, fields ...interface{})

Types

type ZapHandler added in v0.2.12

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

func (*ZapHandler) Enabled added in v0.2.12

func (h *ZapHandler) Enabled(_ context.Context, level slog.Level) bool

func (*ZapHandler) Handle added in v0.2.12

func (h *ZapHandler) Handle(ctx context.Context, record slog.Record) error

func (*ZapHandler) WithAttrs added in v0.2.12

func (h *ZapHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*ZapHandler) WithGroup added in v0.2.12

func (h *ZapHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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