logx

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Tag = "[VPNER]"

Variables

This section is empty.

Functions

func Debugf

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

func Errorf

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

func Infof

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

func LevelTag

func LevelTag(l Level) string

func NewStreamWriter

func NewStreamWriter(prefix string, defaultLevel Level) io.Writer

func Recover

func Recover(where string)

func SetLevel

func SetLevel(name string)

func SetSink

func SetSink(s Sink)

func Warnf

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

Types

type Event

type Event struct {
	UnixMs  int64
	Level   string
	Message string
}

func Recent

func Recent() []Event

type Level

type Level int
const (
	LevelError Level = iota
	LevelWarn
	LevelInfo
	LevelDebug
)

type Sink

type Sink interface {
	Log(level Level, msg string)
}

Jump to

Keyboard shortcuts

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