middleware

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Echo

func Echo(log logger.Client, prefixes ...interface{}) echo.MiddlewareFunc

func Martini

func Martini(prefixes ...interface{}) martini.Handler

Martini is a Martini Middleware that emulates their default logger in the sense that it logs every request and sends it to Papertrail. The logger gets the following info:

  • Time taken for request
  • IP Address of connecting party
  • HTTP Status Code
  • HTTP Status Text
  • Request Method
  • Request Path

The result appears in Papertrail as: [info] 200 OK HEAD 1.109259ms /my/endpoint/ "8.8.8.8"

Types

This section is empty.

Jump to

Keyboard shortcuts

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