logging

package
v0.44.0-migration-mainnet Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: AGPL-3.0 Imports: 6 Imported by: 5 modules, 35 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// KeySuspicious is a logging label. It flags that the log event informs about suspected BYZANTINE
	// behaviour observed by this node. Adding such labels is beneficial for easily searching log events
	// regarding misbehaving nodes.
	// Axiomatically, each node considers its own operator as well as Flow's governance committee as trusted.
	// Hence, potential problems with inputs (mostly configurations) from these sources are *not* considered
	// byzantine. To flag inputs from these sources, please use `logging.KeyPotentialConfigurationProblem`.
	KeySuspicious = "suspicious"

	// KeyPotentialConfigurationProblem is a logging label. It flags that the log event informs about suspected
	// configuration problem by this node. Adding such labels is beneficial for easily searching log events
	// regarding potential configuration problems.
	KeyPotentialConfigurationProblem = "potential-configuration-problem"

	// KeyNetworkingSecurity is a logging label that is used to flag the log event as a networking security issue.
	// This is used to add an easily searchable label to the log events.
	KeyNetworkingSecurity = "networking-security"

	// KeyProtocolViolation is a logging label that is used to flag the log event as byzantine protocol violation.
	// This is used to add an easily searchable label to the log events.
	KeyProtocolViolation = "byzantine-protocol-violation"

	// KeyLoad is a logging label that is used to flag the log event as a load issue.
	KeyLoad = "load"
)

Variables

This section is empty.

Functions

func AsJSON

func AsJSON(v interface{}) []byte

func BurstSampler added in v0.29.0

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 added in v0.17.2

func Type(obj interface{}) string

Types

type BurstSamplerOption added in v0.29.0

type BurstSamplerOption func(*zerolog.BurstSampler)

func WithNextSampler added in v0.29.0

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