logger

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR = LogLevel(0)
	DEBUG = LogLevel(1)
)

Variables

This section is empty.

Functions

func DevNull added in v0.0.51

func DevNull() chan<- string

func StdOut added in v0.0.51

func StdOut(buffered bool) chan<- string

Types

type DaveLogger added in v0.0.51

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

func NewDaveLogger added in v0.0.51

func NewDaveLogger(cfg *DaveLoggerCfg) (*DaveLogger, error)

func NewDaveLoggerToDevNull added in v0.0.51

func NewDaveLoggerToDevNull() *DaveLogger

func (*DaveLogger) Level added in v0.0.51

func (l *DaveLogger) Level() LogLevel

func (*DaveLogger) Log added in v0.0.51

func (l *DaveLogger) Log(level LogLevel, msg string, args ...any)

func (*DaveLogger) WithPrefix added in v0.0.51

func (l *DaveLogger) WithPrefix(prefix string) Logger

type DaveLoggerCfg added in v0.0.51

type DaveLoggerCfg struct {
	Level  LogLevel
	Output chan<- string
	Prefix string
}

type LogLevel

type LogLevel int

type Logger

type Logger interface {
	Log(level LogLevel, msg string, args ...any)
	WithPrefix(prefix string) Logger
}

Jump to

Keyboard shortcuts

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