logging

package
v0.0.0-...-7d43bac Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package logging provides middleware for request logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

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

Middleware is responsible for logging information about HTTP request.

func NewRequestLoggingMiddleware

func NewRequestLoggingMiddleware(reqIDKey string) *Middleware

NewRequestLoggingMiddleware creates instance of Request Logging Middleware.

func (Middleware) Handle

func (m Middleware) Handle(next http.Handler) http.Handler

Handle logs request information.

func (Middleware) HandleWithNext

func (m Middleware) HandleWithNext(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

HandleWithNext logs request information. This is method to support Negroni library.

Jump to

Keyboard shortcuts

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