Documentation ¶
Overview ¶
Package logging provides slog wrappers for jarl logging
Index ¶
Constants ¶
View Source
const ( KeyError = "error" // KeyError represents the error attribute in structured logs KeyMethod = "http.method" // KeyMethod is the logging key for the http method KeyPath = "http.path" // KeyPath is the logging key for the inbound request path KeyHeaders = "http.headers" // KeyHeaders is the logging key for http headers KeyHost = "http.host" // KeyHost is the logging key for the inbound request host KeyContext = "request.context" // KeyContext is the request attributes KeyAllow = "request.allow" // KeyAllow is the logging key for the request outcome KeyClientID = "request.client.id" // KeyClientID is the logging key for the header identifier value KeyProtocol = "request.protocol" // KeyProtocol is the logging key for the GRPC protocol version KeyReason = "reason" // KeyReason is the logging key for the deny reason )
Variables ¶
This section is empty.
Functions ¶
func LogRequest ¶
LogRequest logs an inbout request details
Types ¶
type Context ¶
type Context struct { Protocol string Host string Path string Method string ClientID string Headers map[string]string RequestContext interface{} }
Context holds the request context for unified logging purposes
func AuthV2LoggingContext ¶
func AuthV2LoggingContext(request *authv2.CheckRequest) *Context
AuthV2LoggingContext creates a logging context from an AuthV2 CheckRequest
func AuthV3LoggingContext ¶
func AuthV3LoggingContext(request *authv3.CheckRequest) *Context
AuthV3LoggingContext creates a logging context from an AuthV3 CheckRequest
Click to show internal directories.
Click to hide internal directories.