log

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 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) liberr.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