Documentation
¶
Overview ¶
Package scope provides a scoped logger facade for telemetry.Logger implementations.
Index ¶
- Constants
- Variables
- func DefaultLevel() telemetry.Level
- func Find(name string) (telemetry.Logger, bool)
- func List() map[string]telemetry.Logger
- func Names() []string
- func PrintRegistered()
- func Register(name, description string) telemetry.Logger
- func SetAllScopes(lvl telemetry.Level)
- func SetDefaultLevel(lvl telemetry.Level)
- func UseLogger(logger telemetry.Logger)
Constants ¶
View Source
const (
// Key used to store the name of scope in the logger key/value pairs.
Key = "scope"
)
Variables ¶
View Source
var ( // PanicOnUninitialized can be used when testing for sequencing issues // between creating log lines and initializing the actual logger // implementation to use. PanicOnUninitialized bool )
Functions ¶
func DefaultLevel ¶ added in v0.5.1
DefaultLevel returns the logging level used for new scopes.
func PrintRegistered ¶ added in v0.5.1
func PrintRegistered()
PrintRegistered outputs a list of registered scopes with their log level on stdout.
func SetAllScopes ¶ added in v0.5.2
SetAllScopes sets the logging level to all existing scopes and uses this level for new scopes.
func SetDefaultLevel ¶
SetDefaultLevel sets the default level used for new scopes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.