logger

package
v0.0.0-...-c103791 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level      string `default:"info"`
	Stacktrace bool   `default:"false"`
	Structured bool   `default:"false"`
}

type Logger

type Logger struct {
	*zap.SugaredLogger
}

func FromConfig

func FromConfig(cfg Config) (*Logger, error)

func New

func New() *Logger

func NewWithContext

func NewWithContext(context ...interface{}) *Logger

func NoOp

func NoOp() *Logger

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(template string, args ...interface{})

func (*Logger) Errorw

func (l *Logger) Errorw(msg string, keysAndValues ...interface{})

func (*Logger) Info

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(template string, args ...interface{})

func (*Logger) Infow

func (l *Logger) Infow(msg string, keysAndValues ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(template string, args ...interface{})

func (*Logger) Warnw

func (l *Logger) Warnw(msg string, keysAndValues ...interface{})

func (*Logger) With

func (l *Logger) With(context ...interface{}) *Logger

Jump to

Keyboard shortcuts

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