Skip to content

Commit

Permalink
Merge pull request #307 from ErwinSteffens/fix-custom-module-example
Browse files Browse the repository at this point in the history
Fix the custom module example
  • Loading branch information
mikz authored Mar 16, 2017
2 parents 4934fb8 + 582342b commit 4e62464
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/custom-module/verbose.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ local apicast = require('apicast')
local _M = { _VERSION = '0.0' }
local mt = { __index = apicast }

function _M.new()
return setmetatable(_M, { __index = apicast.new() })
end

function _M.log()
ngx.log(ngx.WARN,
'upstream response time: ', ngx.var.upstream_response_time, ' ',
'upstream connect time: ', ngx.var.upstream_connect_time)
end

return setmetatable(_M, mt)
return _M

0 comments on commit 4e62464

Please sign in to comment.