log

package
v0.0.0-...-ea6506d Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *zap.Logger

FromContext retrieves a *zap.Logger embedded in a context.Context using ToContext.

func ToContext

func ToContext(ctx context.Context, logger *zap.Logger) context.Context

ToContext embeds a *zap.Logger in a context.Context

func WrapHandler

func WrapHandler(h http.Handler, logger *zap.Logger) http.Handler

WrapHandler wraps an http.Handler, adding request logging and decorating its request context with the logger.

When you call FromContext with a wrapped http handler's request object it will return the logger passed here.

Types

This section is empty.

Jump to

Keyboard shortcuts

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