logging

package
v0.0.0-...-56cfc23 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContextOrDiscard

func FromContextOrDiscard(ctx context.Context) logr.Logger

FromContextOrDiscard provides a logger from the context or a logger that discards all messages

func LoggingMiddleware

func LoggingMiddleware(h http.Handler, logger logr.Logger) http.Handler

func New

func New(isDevelopment bool) logr.Logger

func NewContext

func NewContext(ctx context.Context, logger logr.Logger) context.Context

NewContext hydrates the provided context with the provided Logger

Types

type StatusRecorder

type StatusRecorder struct {
	http.ResponseWriter
	Status int
}

func (*StatusRecorder) WriteHeader

func (r *StatusRecorder) WriteHeader(status int)

Jump to

Keyboard shortcuts

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