common

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

Common Log Format Logger

This package enables logging using Common Log Format in go-restful apps.

Usage

Importing
import "github.com/AccelByte/go-restful-plugins/pkg/logger/common"
Log all endpoints
ws := new(restful.WebService)
ws.Filter(common.Log)
Log specific endpoint
ws := new(restful.WebService)
ws.Route(ws.GET("/user/{id}").
    Filter(common.Log).
    To(func(request *restful.Request, response *restful.Response) {
}))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)

Log is a filter that will log incoming request with Common Log Format

Types

This section is empty.

Jump to

Keyboard shortcuts

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