field

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 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 Field

type Field struct {
	// Key is the key used for the field
	Key string
	// Value is the value used for the field and can be anything
	Value any
}

Field is an additional custom field that can be used for structural logging output

func Coordinate

func Coordinate(coordinate coordinate.Coordinate) Field

Coordinate builds a Field containing information taken from the provided coordinate

func Environment

func Environment(environment, group string) Field

Environment builds a Field containing environment information for structured logging

func Error

func Error(err error) Field

Error builds a Field containing error information for structured logging

func F

func F(key string, value interface{}) Field

F creates a new custom field for the logger

func Type

func Type(t string) Field

Type builds a Field containing information about a config type. This is used in cases where no full coordinate exists, but only a config type is known - for example in download or deletion

Jump to

Keyboard shortcuts

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