Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

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.

About

Logrus logging for Goji

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.