logging

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure()

Configure configures zerolog with the required global settings.

func NewValidationWriter

func NewValidationWriter() io.Writer

NewValidationWriter compiles the JSONSchema a producers a Writer which validates the provided JSON documents against the schema. It discards the data after validation.

func SetOptions

func SetOptions(options *options.Options)

SetOptions configures zerolog global settings based on user-configured options.

func Unconfigure added in v0.3.0

func Unconfigure()

Unconfigure restores zerolog to its default settings.

Types

type HTTPHandler

type HTTPHandler struct {
	// contains filtered or unexported fields
}

HTTPHandler is a custom request logger middleware.

func NewHTTPHandler

func NewHTTPHandler(handler http.Handler) *HTTPHandler

NewHTTPHandler creates a new Handler middleware.

func (*HTTPHandler) ServeHTTP

func (c *HTTPHandler) ServeHTTP(
	writer http.ResponseWriter,
	req *http.Request,
)

Jump to

Keyboard shortcuts

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