log

package
v1.19.33-clash.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLevelMapping = map[string]LogLevel{
	ERROR.String():   ERROR,
	WARNING.String(): WARNING,
	INFO.String():    INFO,
	DEBUG.String():   DEBUG,
	SILENT.String():  SILENT,
}

LogLevelMapping is a mapping for LogLevel enum

View Source
var SingInfoToDebugLogger L.ContextLogger = singInfoToDebugLogger{}
View Source
var SingLogger L.ContextLogger = singLogger{}

Functions

func Debugln

func Debugln(format string, v ...any)

func Errorln

func Errorln(format string, v ...any)

func Fatalln

func Fatalln(format string, v ...any)

func Infoln

func Infoln(format string, v ...any)

func SetLevel

func SetLevel(newLevel LogLevel)

func Subscribe

func Subscribe() observable.Subscription[Event]

func UnSubscribe

func UnSubscribe(sub observable.Subscription[Event])

func Warnln

func Warnln(format string, v ...any)

Types

type Event

type Event struct {
	LogLevel LogLevel
	Payload  string
}

func (*Event) Type

func (e *Event) Type() string

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	WARNING
	ERROR
	SILENT
)

func Level

func Level() LogLevel

func (LogLevel) MarshalText

func (l LogLevel) MarshalText() ([]byte, error)

MarshalText serialize LogLevel

func (LogLevel) String

func (l LogLevel) String() string

func (*LogLevel) UnmarshalText

func (l *LogLevel) UnmarshalText(data []byte) error

UnmarshalText unserialize LogLevel

Jump to

Keyboard shortcuts

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