logging

package
v0.29.6-upgrade-to-bad... Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

View Source
const KeySuspicious = "suspicious"

KeySuspicious is a logging label that is used to flag the log event as suspicious behavior This is used to add an easily searchable label to the log event

Variables

This section is empty.

Functions

func AsJSON

func AsJSON(v interface{}) []byte

func BurstSampler

func BurstSampler(burst uint32, interval time.Duration, opts ...BurstSamplerOption) *zerolog.BurstSampler

BurstSampler returns a zerolog.BurstSampler with the provided burst and interval. Logs emitted beyond the burst limit are dropped

func Entity

func Entity(entity flow.Entity) []byte

func ID

func ID(id flow.Identifier) []byte

func IDs

func IDs(ids []flow.Identifier) []string

func Type

func Type(obj interface{}) string

Types

type BurstSamplerOption

type BurstSamplerOption func(*zerolog.BurstSampler)

func WithNextSampler

func WithNextSampler(sampler zerolog.Sampler) BurstSamplerOption

WithNextSampler adds a sampler that is applied after exceeding the burst limit

Jump to

Keyboard shortcuts

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