log

package
v0.0.0-...-0d4bba6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int
const (
	Debug Level = iota
	Info
	Warn
	Error
)

func (Level) MarshalJSON

func (l Level) MarshalJSON() ([]byte, error)

func (Level) String

func (l Level) String() string

type LevelValue

type LevelValue struct {
	Level Level
}

func (*LevelValue) Set

func (p *LevelValue) Set(s string) error

func (*LevelValue) String

func (p *LevelValue) String() string

type Logger

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

func NewLogger

func NewLogger(w io.Writer, level Level) Logger

func (Logger) Log

func (l Logger) Log(level Level, msg string, v any)

func (Logger) LogDebug

func (l Logger) LogDebug(msg string, v any)

func (Logger) LogError

func (l Logger) LogError(msg string, v any)

func (Logger) LogInfo

func (l Logger) LogInfo(msg string, v any)

func (Logger) LogWarn

func (l Logger) LogWarn(msg string, v any)

type Output

type Output struct {
	Date    time.Time
	Level   Level
	Message string
	Value   any
}

Jump to

Keyboard shortcuts

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