logger

package module
v0.0.0-...-5e1e636 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 5 Imported by: 0

README

logger

A simple logging middleware for goa.

[2019-09-03 11:31:07] <-- GET /
[2019-09-03 11:31:07] --> GET / 200 75ms
[2019-09-03 11:31:15] <-- GET /
[2019-09-03 11:31:15] xxx GET /error 500 60ms

Installation

$ go get -u github.com/goa-go/goa

Notes

Recommended that you .use() this middleware near the top to "wrap" all subsequent middleware.

Example

package main

import (
  "github.com/goa-go/goa"
  "github.com/goa-go/logger"
)

func main() {
  app := goa.New()

  app.Use(logger.New())
  ...
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() goa.Middleware

New returns the initialized goa-logger instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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