glogrus provides structured logging via logrus for Goji.
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()
}