github.com/o1egl/elogs

Third party loggers integration for Echo web framework https://github.com/labstack/echo


License
MIT
Install
go get github.com/o1egl/elogs

Documentation

Echo Loggers

License GoDoc Build Status Build status Coverage Status

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)

Submitting a Pull Request

  1. Fork it.
  2. Create a branch (git checkout -b my_branch)
  3. Commit your changes (git commit -am "Added new awesome logger")
  4. Push to the branch (git push origin my_branch)
  5. Open a Pull Request
  6. Enjoy a refreshing Diet Coke and wait

Echo loggers is released under the MIT license. See LICENSE