log

package
v1.13.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + libcfg.MinErrorComponentLog
	ErrorParamInvalid
	ErrorConfigInvalid
	ErrorComponentNotInitialized
	ErrorStartLog
	ErrorReloadLog
)
View Source
const (
	ComponentType = "head"
)
View Source
const (
	DefaultLevel = loglvl.InfoLevel
)

Variables

This section is empty.

Functions

func Register

func Register(cfg libcfg.Config, key string, cpt ComponentLog)

func RegisterNew

func RegisterNew(ctx libctx.FuncContext, cfg libcfg.Config, key string, lvl loglvl.Level)

Types

type ComponentLog

type ComponentLog interface {
	cfgtps.Component

	Log() liblog.Logger

	SetLevel(lvl loglvl.Level)
	GetLevel() loglvl.Level

	SetField(fields logfld.Fields)
	GetField() logfld.Fields

	SetOptions(opt *logcfg.Options) error
	GetOptions() *logcfg.Options
}

func Load

func Load(getCpt cfgtps.FuncCptGet, key string) ComponentLog

func New

Jump to

Keyboard shortcuts

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