diff options
author | Valery Piashchynski <[email protected]> | 2020-11-19 21:34:22 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-19 21:34:22 +0300 |
commit | bc0be9c17220220ae9b40b65e874701edaecd8ce (patch) | |
tree | 6ee032eee330f8bc8824e426bab1846c9479333c /plugins/http/plugin.go | |
parent | 729c19af8c410a28b7b46c134fd7fe9608cd73b1 (diff) |
Add SSL tests
Diffstat (limited to 'plugins/http/plugin.go')
-rw-r--r-- | plugins/http/plugin.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 51142ddd..aae42891 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -108,9 +108,20 @@ func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Serv } s.pool = p + s.AddListener(s.logCallback) + return nil } +func (s *Plugin) logCallback(event interface{}) { + switch ev := event.(type) { + case ResponseEvent: + s.log.Info("response received", "elapsed", ev.Elapsed().String(), "remote address", ev.Request.RemoteAddr) + default: + fmt.Println(event) + } +} + // Serve serves the svc. func (s *Plugin) Serve() chan error { s.Lock() |