log

package
v0.0.0-...-624bb30 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger is a shared go-kit logger.
	// TODO: Change all components to take a non-global logger via their constructors.
	// Prefer accepting a non-global logger as an argument.
	Logger = log.NewLogfmtLogger(os.Stdout)
)

Functions

func CheckFatal

func CheckFatal(location string, err error, logger log.Logger)

CheckFatal prints an error and exits with error code 1 if err is non-nil.

func Flush

func Flush() error

func InitLogger

func InitLogger(cfg *server.Config, reg prometheus.Registerer, sync bool) log.Logger

InitLogger initialises the global gokit logger (util_log.Logger) and returns that logger.

func LevelHandler

func LevelHandler(currentLogLevel *dslog.Level) http.HandlerFunc

LevelHandler returns an http handler function that returns the current log level. The optional query parameter 'log_level' can be passed to change the log level at runtime.

Types

type Flusher

type Flusher interface {
	Flush() error
}

Jump to

Keyboard shortcuts

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