echozap

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 4 Imported by: 30

README

echozap

Middleware for Golang Echo framework that provides integration with Uber´s Zap logging library for logging HTTP requests.

Commitizen friendly semantic-release Actions Status

Pre-requisites

  • Go with Go modules enabled.
  • Echo
  • Zap

Usage

import (
	"github.com/labstack/echo/v4"
	"go.uber.org/zap"
    "github.com/brpaz/echozap"
)

func main() {
    e := echo.New()
    zapLogger, _ = zap.NewProduction()

    e.Use(echozap.ZapLogger(zapLogger))
}

Logged details

The following information is logged:

  • Status Code
  • Time
  • Uri
  • Method
  • Hostname
  • Remote IP Address

Todo

  • Add more customization options.

🤝 Contributing

Contributions, issues and feature requests are welcome!

Show your support

If this project have been useful for you, I would be grateful to have your support.

Give a ⭐️ to the project, or just:

Buy Me A Coffee

Author

👤 Bruno Paz

📝 License

Copyright © 2019 Bruno Paz.

This project is MIT licensed.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL