logger

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 1 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
	Value interface{}
}

func Any

func Any(key string, val interface{}) Field

func Bool

func Bool(key string, b bool) Field

func Error

func Error(err error) Field

func Int32

func Int32(key string, val int32) Field

func Int64

func Int64(key string, val int64) Field

func String

func String(key, val string) Field

type Logger

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

func NewNoOpLogger

func NewNoOpLogger() Logger

type NoOpLogger

type NoOpLogger struct {
}

func (*NoOpLogger) Debug

func (n *NoOpLogger) Debug(msg string, args ...Field)

func (*NoOpLogger) Error

func (n *NoOpLogger) Error(msg string, args ...Field)

func (*NoOpLogger) Info

func (n *NoOpLogger) Info(msg string, args ...Field)

func (*NoOpLogger) Warn

func (n *NoOpLogger) Warn(msg string, args ...Field)

type ZapLogger

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

func NewZapLogger

func NewZapLogger(logger *zap.Logger) *ZapLogger

func (*ZapLogger) Debug

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

func (*ZapLogger) Error

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

func (*ZapLogger) Info

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

func (*ZapLogger) Warn

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

Jump to

Keyboard shortcuts

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