Skip to content
Permalink
Browse files

refactor: include client address in logger

  • Loading branch information...
aofei committed Jul 29, 2019
1 parent e9d3332 commit ad4f511b98613382f351d4ce65ea663f99942abf
Showing with 6 additions and 4 deletions.
  1. +1 −1 go.mod
  2. +2 −2 go.sum
  3. +3 −1 main.go
2 go.mod
@@ -7,7 +7,7 @@ require (
github.com/air-gases/logger v0.12.3
github.com/air-gases/redirector v0.12.3
github.com/aofei/air v0.12.3
github.com/goproxy/goproxy v0.0.0-20190726182701-7d12f3b594cb
github.com/goproxy/goproxy v0.0.0-20190729061614-352b5ce0cc2f
github.com/mitchellh/mapstructure v1.1.2
github.com/rs/zerolog v1.14.3
github.com/tdewolff/minify/v2 v2.5.1 // indirect
4 go.sum
@@ -42,8 +42,8 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4=
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/goproxy/goproxy v0.0.0-20190726182701-7d12f3b594cb h1:BdWounrSDFx3YjUVIT84qv7DocEDFzx4ioEzWndOnXM=
github.com/goproxy/goproxy v0.0.0-20190726182701-7d12f3b594cb/go.mod h1:0jwRZ2U7GCyronU6o2yVhsilidQTJnKPFkrWlUZAF/c=
github.com/goproxy/goproxy v0.0.0-20190729061614-352b5ce0cc2f h1:yufQgj4wCQA8XSjagorn7G0withz+BOnF5bhZmA2Uh8=
github.com/goproxy/goproxy v0.0.0-20190729061614-352b5ce0cc2f/go.mod h1:0jwRZ2U7GCyronU6o2yVhsilidQTJnKPFkrWlUZAF/c=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
@@ -24,7 +24,9 @@ func main() {
a.ErrorHandler = errorHandler

a.Pregases = []air.Gas{
logger.Gas(logger.GasConfig{}),
logger.Gas(logger.GasConfig{
IncludeClientAddress: true,
}),
defibrillator.Gas(defibrillator.GasConfig{}),
redirector.WWW2NonWWWGas(redirector.WWW2NonWWWGasConfig{}),
limiter.BodySizeGas(limiter.BodySizeGasConfig{

0 comments on commit ad4f511

Please sign in to comment.
You can’t perform that action at this time.