logging

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func DebugHost

func DebugHost(host, msg string)

func DebugHostf

func DebugHostf(host, format string, args ...any)

func Debugf

func Debugf(format string, args ...any)

func Error

func Error(msg string)

func ErrorHost

func ErrorHost(host, msg string)

func ErrorHostf

func ErrorHostf(host, format string, args ...any)

func Errorf

func Errorf(format string, args ...any)

func Info

func Info(msg string)

func InfoHost

func InfoHost(host, msg string)

func InfoHostf

func InfoHostf(host, format string, args ...any)

func Infof

func Infof(format string, args ...any)

func SetDefault

func SetDefault(l *Logger)

func Warn

func Warn(msg string)

func WarnHost

func WarnHost(host, msg string)

func WarnHostf

func WarnHostf(host, format string, args ...any)

func Warnf

func Warnf(format string, args ...any)

Types

type Level

type Level int
const (
	LevelDebug Level = -4
	LevelInfo  Level = 0
	LevelWarn  Level = 4
	LevelError Level = 8
)

func (Level) ColorString

func (l Level) ColorString() string

func (Level) String

func (l Level) String() string

type Logger

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

func Default

func Default() *Logger

func New

func New(out io.Writer, level Level) *Logger

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

Jump to

Keyboard shortcuts

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