logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 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 Logger

type Logger interface {
	DebugKV(message string, kvs ...interface{})
	InfoKV(message string, kvs ...interface{})
	WarnKV(message string, kvs ...interface{})
	ErrorKV(message string, kvs ...interface{})
	FatalKV(message string, kvs ...interface{})
	// AddContext adds a scope key-value pairs to the logger and returnes scoped logger
	AddContext(ctx ...interface{}) Logger
}

Logger defines logger interface.

func NewEmptyLogger

func NewEmptyLogger() Logger

NewEmptyLogger is for units tests where you don't want to define logger mock calls.

func NewLogger

func NewLogger(ctxKvs ...interface{}) Logger

NewLogger returns a new instance of Logger. ctxKvs adds a scope key-value pairs to the logger and returnes scoped logger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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