Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 423 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 423 Bytes

logger

A tiny middleware for negroni et al. Writes logs in json which makes it easy to get them into elasticsearch.

Go get it

go get github.com/sontags/logger

Usage

Easy:

package main

import (
	// ...

	"github.com/codegangsta/negroni"
	"github.com/sontags/logger"
)

// ...

func main() {}
    // ...

	n := negroni.New(
		negroni.NewRecovery(),
		logger.NewLogger(),
	)

	// ...
}