reqlog

package module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 6 Imported by: 4

README

Request logging middleware for treemux

To install:

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

To use:

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

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

With options:

import "github.com/uptrace/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

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

Types

type Option

type Option func(c *config)

func WithVerbose

func WithVerbose(on bool) Option

Jump to

Keyboard shortcuts

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