leveledlog

package
v0.0.0-...-1903316 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 8 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 int8
const (
	LevelAll Level = iota
	LevelInfo
	LevelWarning
	LevelError
	LevelFatal
	LevelOff
)

func (Level) String

func (l Level) String() string

type Logger

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

func NewJSONLogger

func NewJSONLogger(out io.Writer, minLevel Level) *Logger

func NewLogger

func NewLogger(out io.Writer, minLevel Level, colorize bool) *Logger

func (*Logger) Error

func (l *Logger) Error(err error)

func (*Logger) Fatal

func (l *Logger) Fatal(err error)

func (*Logger) Info

func (l *Logger) Info(format string, v ...any)

func (*Logger) Warning

func (l *Logger) Warning(format string, v ...any)

Jump to

Keyboard shortcuts

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