package
2.0.1+incompatible
Repository: https://github.com/accelbyte/go-restful-plugins.git
Documentation: pkg.go.dev

# 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) {
}))

# Functions

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