logger

package
v0.0.0-...-57dcc05 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLoggers

func ConfigureLoggers(config string) error

ConfigureLoggers configures loggers on the default context according to the given string specification, which specifies a set of modules and their associated logging levels. Loggers are colon- or semicolon-separated; each module is specified as <modulename>=<level>. White space outside of module names and levels is ignored. The root module is specified with the name "<root>".

An example specification:

`<root>=ERROR; foo.bar=WARNING`

func DefaultContext

func DefaultContext() logger.LoggerContext

DefaultContext returns a logger factory that creates loggers.

func GetLogger

func GetLogger(name string, tags ...string) logger.Logger

GetLogger returns the default logger. Currently this is backed with loggo.

func LoggerContext

func LoggerContext(level logger.Level) logger.LoggerContext

LoggerContext returns a logger factory that creates loggers. Currently this is backed with loggo.

func Noop

func Noop() logger.Logger

Noop is a logger.Logger that doesn't do anything.

func WrapLoggo

func WrapLoggo(logger loggo.Logger) logger.Logger

WrapLoggo wraps a loggo.Logger as a logger.Logger.

func WrapLoggoContext

func WrapLoggoContext(context *loggo.Context) logger.LoggerContext

WrapLoggoContext wraps a loggo.Context as a logger.LoggerContext.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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