logger

package
v0.0.0-...-d8e0d35 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 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 Impl

type Impl struct {
}

func New

func New() *Impl

New returns new logger instance.

func (*Impl) Debug

func (i *Impl) Debug(msg string, args ...any)

Debug prints debug message

func (*Impl) Error

func (i *Impl) Error(err error)

Error prints error message

type Logger

type Logger interface {
	Debug(msg string, args ...any)
	Error(err error)
}

type Null

type Null struct {
}

func NewNull

func NewNull() *Null

NewNull returns new null logger instance which can be used in unit tests for example.

func (*Null) Debug

func (n *Null) Debug(msg string, args ...any)

Debug prints debug message

func (*Null) Error

func (n *Null) Error(_ error)

Error prints error message

Jump to

Keyboard shortcuts

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