hiedalog

package module
v0.0.0-...-c2545e8 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 1 Imported by: 16

Documentation

Index

Constants

View Source
const (
	DLN_FATAL   = "FATAL"
	DLN_PANIC   = "PANIC"
	DLN_ERROR   = "ERROR"
	DLN_WARN    = "WARN"
	DLN_INFO    = "INFO"
	DLN_VERBOSE = "VERBOSE"
	DLN_DEBUG   = "DEBUG"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HiedaLogBackend

type HiedaLogBackend interface {
	EmitStringLog(module string, level HiedaLogLevel, content string)
	EmitComplexLog(module string, level HiedaLogLevel, data map[string]string)
}

type HiedaLogBackendConfig

type HiedaLogBackendConfig struct {
	Backend       HiedaLogBackend
	FilterLevelID uint8
}

type HiedaLogLevel

type HiedaLogLevel struct {
	Name        string
	LevelNumber uint8
}

type HiedaLogLevelFilter

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

func NewDefaultLevelFilter

func NewDefaultLevelFilter() HiedaLogLevelFilter

func NewLevelFilter

func NewLevelFilter(levelList []HiedaLogLevel, defaultLevelID uint8) HiedaLogLevelFilter

func (*HiedaLogLevelFilter) CanEmit

func (f *HiedaLogLevelFilter) CanEmit(name string, reflevel uint8) bool

func (*HiedaLogLevelFilter) CanEmitEx

func (f *HiedaLogLevelFilter) CanEmitEx(name string, reflevel uint8) (bool, HiedaLogLevel)

func (*HiedaLogLevelFilter) GetLevelList

func (f *HiedaLogLevelFilter) GetLevelList() []HiedaLogLevel

func (*HiedaLogLevelFilter) NameToID

func (f *HiedaLogLevelFilter) NameToID(name string) uint8

func (*HiedaLogLevelFilter) NameToLevel

func (f *HiedaLogLevelFilter) NameToLevel(name string) HiedaLogLevel

type HiedaLogger

type HiedaLogger struct {
	BackendConfigs []HiedaLogBackendConfig
	LevelFilter    HiedaLogLevelFilter
}

func NewHiedaLogger

func NewHiedaLogger() *HiedaLogger

func (*HiedaLogger) AddBackend

func (l *HiedaLogger) AddBackend(backend HiedaLogBackend, filterLevelID uint8)

func (*HiedaLogger) EmitComplexLog

func (l *HiedaLogger) EmitComplexLog(module string, level HiedaLogLevel, data map[string]string)

func (*HiedaLogger) EmitStringLog

func (l *HiedaLogger) EmitStringLog(module string, level HiedaLogLevel, content string)

func (*HiedaLogger) LogComplex

func (l *HiedaLogger) LogComplex(module, levelName string, data map[string]string)

func (*HiedaLogger) LogPrint

func (l *HiedaLogger) LogPrint(module, level string, d ...interface{})

func (*HiedaLogger) LogPrintf

func (l *HiedaLogger) LogPrintf(module, level, format string, d ...interface{})

func (*HiedaLogger) LogString

func (l *HiedaLogger) LogString(module, levelName, content string)

Jump to

Keyboard shortcuts

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