config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeFilePath

func CanonicalizeFilePath(filepath string) string

func CanonicalizePath

func CanonicalizePath(path string) string

func DefaultLoggingLevel

func DefaultLoggingLevel() logging.Level

DefaultLoggingLevel returns the fallback value for loggers to use if parsing fails

func LoadConfig

func LoadConfig(filename string, configPath []string) error

func LoggingInit

func LoggingInit(format string, output io.Writer)

Types

type ModuleLeveled

type ModuleLeveled struct {
	logging.Backend
	// contains filtered or unexported fields
}
var (
	DefaultBackend *ModuleLeveled
)

func DuplicateLevelBackend

func DuplicateLevelBackend(backend logging.Backend) *ModuleLeveled

duplicate from the default one and replace with another backend

func (*ModuleLeveled) GetLevel

func (l *ModuleLeveled) GetLevel(module string) logging.Level

GetLevel returns the log level for the given module.

func (*ModuleLeveled) IsEnabledFor

func (l *ModuleLeveled) IsEnabledFor(level logging.Level, module string) bool

IsEnabledFor will return true if logging is enabled for the given module.

func (*ModuleLeveled) Log

func (l *ModuleLeveled) Log(level logging.Level, calldepth int, rec *logging.Record) error

func (*ModuleLeveled) SetLevel

func (l *ModuleLeveled) SetLevel(level logging.Level, module string)

SetLevel sets the log level for the given module.

Jump to

Keyboard shortcuts

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