logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLevel = errors.New("invalid log level")
)

Functions

This section is empty.

Types

type External added in v0.0.1

type External interface {
	Error(string, []any)
	Info(string, []any)
	Debug(string, []any)
	Trace(string, []any)
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New added in v0.0.1

func New(ext External) Logger

func NewWithLevel added in v0.0.1

func NewWithLevel(ext External, level string) (Logger, error)

func (*Logger) Debug

func (l *Logger) Debug(msg string, args ...any)

func (*Logger) DebugFunc added in v0.0.1

func (l *Logger) DebugFunc(f func() (string, []any))

func (*Logger) Error

func (l *Logger) Error(msg string, args ...any)

func (*Logger) ErrorFunc added in v0.0.1

func (l *Logger) ErrorFunc(f func() (string, []any))

func (*Logger) Info

func (l *Logger) Info(msg string, args ...any)

func (*Logger) InfoFunc added in v0.0.1

func (l *Logger) InfoFunc(f func() (string, []any))

func (*Logger) Level added in v0.0.1

func (l *Logger) Level(lvl int)

func (*Logger) Trace

func (l *Logger) Trace(msg string, args ...any)

func (*Logger) TraceFunc added in v0.0.1

func (l *Logger) TraceFunc(f func() (string, []any))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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