reqlog

package module
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 6 Imported by: 0

README

Request logging middleware for treemux

To install:

go get github.com/vmihailenco/treemux/extra/reqlog

To use:

import "github.com/vmihailenco/treemux/extra/reqlog"

router := treemux.New(
    treemux.WithMiddleware(reqlog.NewMiddleware()),
)

With options:

import "github.com/vmihailenco/treemux/extra/reqlog"

reqlogMiddleware := reqlog.NewMiddleware(reqlog.WithVerbose(false))

router := treemux.New(
    treemux.WithMiddleware(reqlogMiddleware),
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware added in v0.3.0

func NewMiddleware(opts ...Option) treemux.MiddlewareFunc

Types

type Option added in v0.2.0

type Option func(c *config)

func WithVerbose added in v0.2.0

func WithVerbose(on bool) Option

Jump to

Keyboard shortcuts

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