Logrus logging for Goji
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
glogrus.go
writer_proxy.go

README.md

goji/glogrus GoDoc

glogrus provides structured logging via logrus for Goji.

Example

package main

import(
	"github.com/zenazn/goji"
	"github.com/zenazn/goji/web/middleware"
	"github.com/goji/glogrus"
	"github.com/sirupsen/logrus"
)

func main() {
	goji.Abandon(middleware.Logger)

	logr := logrus.New()
	logr.Formatter = new(logrus.JSONFormatter)
	goji.Use(glogrus.NewGlogrus(logr, "my-app-name"))

	goji.Get("/ping", yourHandler)
	goji.Serve()
}

Looking for hierarchical structured logging?

slog and lunk looks interesting.