logging

package
v0.0.0-...-e8f2edf Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LOG_LEVEL_DEFAULT slog.Level = slog.LevelInfo
	LOG_STYLE_DEFAULT string     = "TEXT"
	LOG_PATH_DEFAULT  string     = "stderr"
)

Variables

This section is empty.

Functions

func SetupBasicLogging

func SetupBasicLogging(debug bool) (err error)

Types

type LogLevels

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

func NewLogLevels

func NewLogLevels() (logLevels *LogLevels)

func (*LogLevels) Canonicalize

func (l *LogLevels) Canonicalize(levelName string) string

func (*LogLevels) GetLevel

func (l *LogLevels) GetLevel(levelName string) (level slog.Level, valid bool)

func (*LogLevels) Levels

func (l *LogLevels) Levels() (levels []string)

func (*LogLevels) String

func (ls *LogLevels) String() string

func (*LogLevels) Valid

func (l *LogLevels) Valid(levelName string) (valid bool)

type LogManager

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

func NewLogManager

func NewLogManager() (lm *LogManager)

func (*LogManager) CloseLog

func (lm *LogManager) CloseLog() (err error)

func (*LogManager) Config

func (lm *LogManager) Config(cfg *lc.LogConfig) (err error)

func (*LogManager) ConfigAndSetup

func (lm *LogManager) ConfigAndSetup(cfg *lc.LogConfig) (err error)

func (*LogManager) Logger

func (lm *LogManager) Logger() *slog.Logger

func (*LogManager) OpenLog

func (lm *LogManager) OpenLog() (err error)

func (*LogManager) SetLevel

func (lm *LogManager) SetLevel(levelName string) (err error)

func (*LogManager) SetPath

func (lm *LogManager) SetPath(path string) (err error)

func (*LogManager) SetStyle

func (lm *LogManager) SetStyle(styleName string) (err error)

func (*LogManager) Setup

func (lm *LogManager) Setup() (err error)

func (*LogManager) SetupHandler

func (lm *LogManager) SetupHandler() (err error)

type LogStyles

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

func NewLogStyles

func NewLogStyles() (logStyles *LogStyles)

func (*LogStyles) Canonicalize

func (ls *LogStyles) Canonicalize(styleName string) string

func (*LogStyles) GetStyle

func (ls *LogStyles) GetStyle(styleName string) (style string, valid bool)

func (*LogStyles) String

func (ls *LogStyles) String() string

func (*LogStyles) Styles

func (ls *LogStyles) Styles() (styles []string)

func (*LogStyles) Valid

func (ls *LogStyles) Valid(styleName string) (valid bool)

Jump to

Keyboard shortcuts

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