log

package
v0.0.0-...-823d357 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// matches URLs that look like /subscriptions/%s/providers/%s/%s
	RXProviderResourceKind = regexp.MustCompile(`^/subscriptions/([^/]+)/providers/([^/]+)/([^/]+)$`)

	// matches URLs that look like /admin/providers/%s/%s
	RXAdminProvider = regexp.MustCompile(`^/admin/providers/([^/]+)/([^/]+)$`)

	RXTolerantResourceID = regexp.MustCompile(`(?i)^(?:/admin)?/subscriptions/([^/]+)(?:/resourceGroups/([^/]+)(?:/providers/([^/]+)/([^/]+)(?:/([^/]+))?)?)?`)

	RXTolerantSubResourceID = regexp.MustCompile(`(?i)^(?:/admin)?/subscriptions/([^/]+)(?:/resourceGroups/([^/]+)(?:/providers/([^/]+)/([^/]+)/([^/]+)(?:/([^/]+))?)?)?`)
)

Functions

func EnrichWithCorrelationData

func EnrichWithCorrelationData(log *logrus.Entry, correlationData *api.CorrelationData) *logrus.Entry

EnrichWithCorrelationData sets log fields based on an optional correlationData struct

func EnrichWithPath

func EnrichWithPath(log *logrus.Entry, path string) *logrus.Entry

EnrichWithPath parses the URL path for part or all of an Azure resource ID and sets log fields accordingly

func EnrichWithResourceID

func EnrichWithResourceID(log *logrus.Entry, resourceID string) *logrus.Entry

EnrichWithResourceID sets log fields based on a resource ID

func GetAuditEntry

func GetAuditEntry() *logrus.Entry

GetAuditEntry returns a consistently configured audit log entry

func GetLogger

func GetLogger() *logrus.Entry

GetLogger returns a consistently configured log entry

func LogrWrapper

func LogrWrapper(logger *logrus.Entry) logr.Logger

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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