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.
Click to show internal directories.
Click to hide internal directories.