logging

package
v0.0.0-...-31d5520 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log = log.New()
)

Functions

This section is empty.

Types

type ColorFlag

type ColorFlag int
const (
	ModuleKey  = "module"
	MainModule = ""

	ColorAuto   ColorFlag = 0
	ColorAlways ColorFlag = 1
	ColorNever  ColorFlag = 2
)

func (*ColorFlag) Set

func (c *ColorFlag) Set(value string) error

func (ColorFlag) String

func (c ColorFlag) String() string

type Config

type Config struct {
	Modules     ModuleLevels
	Color       ColorFlag
	StderrLevel Level
	Filename    string
}

func (*Config) Apply

func (c *Config) Apply(mainLogger log.Logger) error

func (*Config) SetupFlags

func (c *Config) SetupFlags()

type Level

type Level log.Lvl

func (*Level) Set

func (l *Level) Set(value string) error

func (*Level) String

func (l *Level) String() string

type ModuleLevels

type ModuleLevels map[string]log.Lvl

func (ModuleLevels) Set

func (l ModuleLevels) Set(config string) error

func (ModuleLevels) String

func (l ModuleLevels) String() string

Jump to

Keyboard shortcuts

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