log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLevel

func GetLevel(module string) log.Level

GetLevel returns the log level for the given module.

func GetSpec

func GetSpec() string

GetSpec returns the log spec which specifies the log level of each individual module. The spec is in the following format:

module1=level1:module2=level2:module3=level3:defaultLevel

Example:

module1=error:module2=debug:module3=warning:info

func SetDefaultLevel

func SetDefaultLevel(level log.Level)

SetDefaultLevel sets the default log level.

func SetLevel

func SetLevel(module string, level log.Level)

SetLevel sets the log level for given module and level.

func SetSpec

func SetSpec(spec string) error

SetSpec sets the log levels for individual modules as well as the default log level. The format of the spec is as follows:

module1=level1:module2=level2:module3=level3:defaultLevel

Valid log levels are: critical, error, warning, info, debug

Example:

module1=error:module2=debug:module3=warning:info

Types

This section is empty.

Jump to

Keyboard shortcuts

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