log

package
v0.0.0-...-6202178 Latest Latest
Warning

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

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

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

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

func FileHookFromConfigLine(
	fs fsext.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