hook

package
v0.0.0-...-3de4a33 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHooks

func RegisterHooks(core encoder.Core, hooks ...func(encoder.Entry) error) encoder.Core

RegisterHooks wraps a Core and runs a collection of user-defined callback hooks each time a message is logged. Execution of the callbacks is blocking.

This offers users an easy way to register simple callbacks (e.g., metrics collection) without implementing the full Core interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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