field

package
v2.17.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 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 StatusDeployed added in v2.8.2

func StatusDeployed() Field

func StatusDeploying added in v2.8.2

func StatusDeploying() Field

func StatusDeploymentFailed added in v2.8.2

func StatusDeploymentFailed() Field

func StatusDeploymentSkipped added in v2.8.2

func StatusDeploymentSkipped() Field

func Type

func Type[X ~string](t X) 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

type LogCoordinate added in v2.6.0

type LogCoordinate struct {
	Reference string `json:"reference"`
	Project   string `json:"project"`
	Type      string `json:"type"`
	ConfigID  string `json:"configID"`
}

LogCoordinate is the type to be used to log coordinates as context fields

Jump to

Keyboard shortcuts

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