Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLoggingLevel ¶
func DefaultLoggingLevel() logging.Level
DefaultLoggingLevel returns the fallback value for loggers to use if parsing fails
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.
Click to show internal directories.
Click to hide internal directories.