httplog

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusLevel

func StatusLevel(status int) zapcore.Level

StatusLevel takes an HTTP status and returns an appropriate log level.

Types

type HeadersLogObject added in v1.72.0

type HeadersLogObject struct {
	Headers                                 http.Header
	InsecureDisableConfidentialSanitization bool
}

HeadersLogObject encodes an http.Header into a zap logging object.

func (HeadersLogObject) MarshalJSON added in v1.72.1

func (o HeadersLogObject) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshal.

func (HeadersLogObject) MarshalLogObject added in v1.72.0

func (o HeadersLogObject) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements the zapcore.ObjectMarshaler interface.

type RequestQueryLogObject added in v1.72.0

type RequestQueryLogObject struct {
	Query                                   url.Values
	InsecureDisableConfidentialSanitization bool
}

RequestQueryLogObject encodes a URL query string into a zap logging object.

func (RequestQueryLogObject) MarshalJSON added in v1.72.1

func (o RequestQueryLogObject) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshal.

func (RequestQueryLogObject) MarshalLogObject added in v1.72.0

func (o RequestQueryLogObject) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements the zapcore.ObjectMarshaler interface.

Jump to

Keyboard shortcuts

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