logger

package
v6.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg ...Config) iris.HandlerFunc

New returns the logger middleware receives optional configs(logger.Config)

Types

type Config

type Config struct {
	// Status displays status code (bool)
	Status bool
	// IP displays request's remote address (bool)
	IP bool
	// Method displays the http method (bool)
	Method bool
	// Path displays the request path (bool)
	Path bool
}

Config are the options of the logger middlweare contains 4 bools Status, IP, Method, Path if set to true then these will print

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns an options which all properties are true except EnableColors

Jump to

Keyboard shortcuts

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