Skip to content

sandalwing/echo-logrusmiddleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

echo-logrusmiddleware

logrus middleware

An adapter (middleware) to make the Golang Echo web framework logging work with logrus, an excellent logging solution.

Install

$ go get github.com/sandalwing/echo-logrusmiddleware

Usage

package main

import (
	"github.com/Sirupsen/logrus"
	"github.com/labstack/echo"
	"github.com/sandalwing/echo-logrusmiddleware"
)

func main() {
	e := echo.New()

	// echo Logger interface friendly wrapper around logrus logger to use it
	// for default echo logger
	e.Logger = logrusmiddleware.Logger{logrus.StandardLogger()}
	e.Use(logrusmiddleware.Hook())

	// do the rest of your echo setup, routes, listen on server, etc..
}

About

An adapter to make the Golang Echo web framework logging work with github.com/Sirupsen/logrus.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages