log

package
v0.0.0-...-a7deaca Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLevel

func DefaultLevel() string

DefaultLevel returns the fallback value for loggers to use if parsing fails.

func GetModuleLevel

func GetModuleLevel(module string) string

GetModuleLevel gets the current logging level for the specified module.

func InitBackend

func InitBackend(formatter logging.Formatter, output io.Writer)

InitBackend sets up the logging backend based on the provided logging formatter and I/O writer.

func MustGetLogger

func MustGetLogger(module string) *logging.Logger

MustGetLogger is used in place of `logging.MustGetLogger` to allow us to store a map of all modules and submodules that have loggers in the system.

func Reset

func Reset()

func SetFormat

func SetFormat(formatSpec string) logging.Formatter

SetFormat sets the logging format.

func SetModuleLevel

func SetModuleLevel(moduleRegExp string, level string) (string, error)

SetModuleLevel sets the logging level for the modules that match the supplied regular expression. Can be used to dynamically change the log level for the module.

Types

This section is empty.

Jump to

Keyboard shortcuts

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