logger

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

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*zap.SugaredLogger
}

Logger wraps zap.Logger with additional functionality

func New

func New(cfg LoggerConfig) (*Logger, error)

New creates a new logger instance

func NopLogger

func NopLogger() *Logger

func (*Logger) WithError

func (l *Logger) WithError(err error) *Logger

WithError returns a new logger with the error field

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[string]interface{}) *Logger

WithFields returns a new logger with the given fields

type LoggerConfig

type LoggerConfig struct {
	Level   string
	DevMode bool
}

Jump to

Keyboard shortcuts

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