Skip to content

Instantly share code, notes, and snippets.

@fannheyward
Created July 3, 2017 02:57
Show Gist options
  • Save fannheyward/05537c04550a5333fb2e4f92c2880c04 to your computer and use it in GitHub Desktop.
Save fannheyward/05537c04550a5333fb2e4f92c2880c04 to your computer and use it in GitHub Desktop.
local function log_wrapper(...)
local pos_info = debug.getinfo(2)
ngx.log(ngx.ERR, pos_info.short_src, ":", pos_info.currentline,
": ", pos_info.name, ":", ...)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment