Echo Loggers
Overview
Echo Loggers is a bundle of third party loggers implementation for Echo web framework
Supported loggers
Installation
$ go get -u github.com/o1egl/echo-loggers
Usage
Logrus
import (
"github.com/labstack/echo"
"github.com/o1egl/elogs/logrus"
log "github.com/Sirupsen/logrus"
)
// From default logger
l := logrus.New()
// From custom logger
ls := log.New()
l := logrus.FromLogger(ls)
e := echo.New()
e.SetLogger(l)
glog
import (
"github.com/labstack/echo"
"github.com/o1egl/elogs/glog"
)
l := glog.New()
e := echo.New()
e.SetLogger(l)
go-logger
import (
"github.com/labstack/echo"
"github.com/o1egl/elogs/gologger"
log "github.com/apsdehal/go-logger"
"os"
)
// From default logger
l := gologger.New()
// From custom logger
lg, _ := log.New("test", 1, os.Stdout)
l := gologger.FromLogger(lg)
e := echo.New()
e.SetLogger(l)
Copyright, License & Contributors
Submitting a Pull Request
- Fork it.
- Create a branch (
git checkout -b my_branch
) - Commit your changes (
git commit -am "Added new awesome logger"
) - Push to the branch (
git push origin my_branch
) - Open a Pull Request
- Enjoy a refreshing Diet Coke and wait
Echo loggers is released under the MIT license. See LICENSE