Documentation ¶
Index ¶
- Variables
- func EnrichWithCorrelationData(log *logrus.Entry, correlationData *api.CorrelationData) *logrus.Entry
- func EnrichWithPath(log *logrus.Entry, path string) *logrus.Entry
- func EnrichWithResourceID(log *logrus.Entry, resourceID string) *logrus.Entry
- func GetAuditEntry() *logrus.Entry
- func GetLogger() *logrus.Entry
- func LogrWrapper(logger *logrus.Entry) logr.Logger
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 ¶
EnrichWithPath parses the URL path for part or all of an Azure resource ID and sets log fields accordingly
func EnrichWithResourceID ¶
EnrichWithResourceID sets log fields based on a resource ID
func GetAuditEntry ¶
GetAuditEntry returns a consistently configured audit log entry
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.