Documentation ¶
Overview ¶
Index ¶
- func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter
- func WrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler
- type LoggableHTTPHeader
- type LoggableHTTPRequest
- type LoggableHTTPRequestClient
- type LoggableStringArray
- type LoggableTLSConnState
- type LoggingRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggingResponseWriter ¶
func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter
Types ¶
type LoggableHTTPHeader ¶
LoggableHTTPHeader makes an HTTP header loggable with zap.Object(). Headers with potentially sensitive information (Cookie, Set-Cookie, Authorization, and Proxy-Authorization) are logged with empty values.
func (LoggableHTTPHeader) MarshalLogObject ¶
func (h LoggableHTTPHeader) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject satisfies the zapcore.ObjectMarshaler interface.
type LoggableHTTPRequest ¶
ref: caddyserver modules/caddyhttp/marshalers.go LoggableHTTPRequest makes an HTTP request loggable with zap.Object().
func (LoggableHTTPRequest) MarshalLogObject ¶
func (r LoggableHTTPRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject satisfies the zapcore.ObjectMarshaler interface.
type LoggableHTTPRequestClient ¶
func (LoggableHTTPRequestClient) MarshalLogObject ¶
func (r LoggableHTTPRequestClient) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject satisfies the zapcore.ObjectMarshaler interface.
type LoggableStringArray ¶
type LoggableStringArray []string
LoggableStringArray makes a slice of strings marshalable for logging.
func (LoggableStringArray) MarshalLogArray ¶
func (sa LoggableStringArray) MarshalLogArray(enc zapcore.ArrayEncoder) error
MarshalLogArray satisfies the zapcore.ArrayMarshaler interface.
type LoggableTLSConnState ¶
type LoggableTLSConnState tls.ConnectionState
LoggableTLSConnState makes a TLS connection state loggable with zap.Object().
func (LoggableTLSConnState) MarshalLogObject ¶
func (t LoggableTLSConnState) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject satisfies the zapcore.ObjectMarshaler interface.
type LoggingRoundTripper ¶
type LoggingRoundTripper struct {
Base http.RoundTripper
}
This type implements the http.RoundTripper interface