log

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Overview

Package log implements various logrus hooks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncHook added in v0.44.0

type AsyncHook interface {
	logrus.Hook

	// Listen waits and handles logrus.Hook.Fire events.
	// It stops when the context is canceled.
	Listen(ctx context.Context)
}

AsyncHook extends the logrus.Hook functionality handling logging in a not blocking way.

func FileHookFromConfigLine added in v0.37.0

func FileHookFromConfigLine(
	fs afero.Fs, getCwd func() (string, error),
	fallbackLogger logrus.FieldLogger, line string,
) (AsyncHook, error)

FileHookFromConfigLine returns new fileHook hook.

func LokiFromConfigLine

func LokiFromConfigLine(fallbackLogger logrus.FieldLogger, line string) (AsyncHook, error)

LokiFromConfigLine returns a new logrus.Hook that pushes logrus.Entrys to loki and is configured through the provided line.

Jump to

Keyboard shortcuts

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