Skip to content

gobuffalo/mw-paramlogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mw-paramlogger

Standard Test Go Reference

NOTE: v1.0.2 will be the last version of this module and it will be deprecated. Use https://github.com/gobuffalo/middleware instead.

Requirements

  • Go 1.16+ but 1.17 and 1.18 are officially supported
  • Go Modules

Installation

$ go get github.com/gobuffalo/mw-paramlogger@latest

Usage

Paramlogger is used by applications generated by the Buffalo CLI. You can see its usage in the actions/app.go file of a generated application:

...
// Log request parameters (filters apply).
app.Use(paramlogger.ParameterLogger)
...

(Use case) Filtering some parameters

In some cases there is the need to avoid logging certain parameters for security reasons. The Paramlogger middleware allows to exclude those parameters by specifying those in the ParameterExclusionList before using the ParamegerLogger middleware in the app.

paramlogger.ParameterExclusionList = append(ParameterExclusionList, "secure", "secure_parameter")
app.Use(paramlogger.ParameterLogger)

About

Buffalo Params Logger Middleware

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 5

Languages