log

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamsEmpty liberr.CodeError = iota + libcfg.MinErrorComponentLog
	ErrorParamsInvalid
	ErrorConfigInvalid
	ErrorComponentNotInitialized
	ErrorStartLog
	ErrorReloadLog
)
View Source
const (
	DefaultLevel  = liblog.InfoLevel
	ComponentType = "log"
)

Variables

This section is empty.

Functions

func IsCodeError

func IsCodeError() bool

func Register

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

func RegisterNew

func RegisterNew(cfg libcfg.Config, key string, lvl liblog.Level, defLogger func() liblog.Logger)

func SetDefaultConfig

func SetDefaultConfig(cfg []byte)

Types

type ComponentLog

type ComponentLog interface {
	libcfg.Component

	Log() liblog.Logger

	SetLevel(lvl liblog.Level)
	SetField(fields liblog.Fields)
	SetOptions(opt *liblog.Options) liberr.Error
}

func Load

func Load(getCpt libcfg.FuncComponentGet, key string) ComponentLog

func New

func New(lvl liblog.Level, defLogger func() liblog.Logger) ComponentLog

type DefaultModel

type DefaultModel struct {
	liblog.Options
}

Jump to

Keyboard shortcuts

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