log

package
v0.0.0-...-4976903 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normal

func Normal(p Printer, format string, v ...interface{})

func Verbose

func Verbose(p Printer, format string, v ...interface{})

Types

type Level

type Level int
const (
	TaciturnLevel Level = iota - 1
	NormalLevel
	VerboseLevel
)

func LevelOf

func LevelOf(p Printer) Level

func (*Level) MarshalText

func (lvl *Level) MarshalText() (text []byte, err error)

func (*Level) String

func (lvl *Level) String() string

func (*Level) UnmarshalText

func (lvl *Level) UnmarshalText(text []byte) error

type Leveler

type Leveler interface {
	Level() Level
}

type Printer

type Printer interface {
	Print(lvl Level, msg string)
}

func WithWriter

func WithWriter(lvl Level, w io.Writer) Printer

Jump to

Keyboard shortcuts

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