filter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilteringFormatter

type FilteringFormatter struct {
	// contains filtered or unexported fields
}

FilteringFormatter decorator implementing logrus.Formatter interface. It is a wrapper around a given formatter adding filtering by log entries keys.

func NewFilteringFormatter

func NewFilteringFormatter(cfg FilteringFormatterConfig, wrapped logrus.Formatter) *FilteringFormatter

NewFilteringFormatter creates a new FilteringFormatter.

func (*FilteringFormatter) Format

func (f *FilteringFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format renders a single log entry.

type FilteringFormatterConfig

type FilteringFormatterConfig struct {
	IncludeFilters config.LogFilters
	ExcludeFilters config.LogFilters
}

FilteringFormatterConfig is the configuration used to instantiate a new FilteringFormatter.

Jump to

Keyboard shortcuts

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