logger

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultErrLogger added in v1.7.0

func DefaultErrLogger(args ...any)

DefaultErrLogger is the default error logger which prints using standard go log pkg

func ErrLogf added in v1.7.0

func ErrLogf(prefix, format string, args ...any)

ErrLogf formats and prints to global error logger

func Logf added in v1.5.0

func Logf(prefix, format string, args ...any)

Logf formats and prints to global standard logger

func WithErrLogger added in v1.7.0

func WithErrLogger(l Logger)

WithErrLogger sets the global error logger

func WithLogger added in v1.4.0

func WithLogger(l Logger)

WithLogger sets the global standard logger

Types

type Logger

type Logger func(...interface{})

Logger defines the interface for logging.

var DefaultLogger Logger = func(args ...interface{}) {}

DefaultLogger is a no-op logger function that does nothing

func GetErrLogger added in v1.7.0

func GetErrLogger() Logger

GetErrLogger gets the global error logger

func GetLogger added in v1.4.0

func GetLogger() Logger

GetLogger gets the global standard logger

Jump to

Keyboard shortcuts

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