logger

package
v0.0.0-...-7efebb4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT 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 any
}

func Bool

func Bool(key string, val bool) Field

func Error

func Error(err error) Field

func Int

func Int(key string, val int) Field

func Int32

func Int32(key string, val int32) Field

func Int64

func Int64(key string, val int64) Field

func String

func String(key string, 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 NewLogger

func NewLogger(logger *zap.Logger) Logger

type ZapLogger

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

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