# HG changeset patch # User Kim Alvefur # Date 1554041497 -7200 # Node ID f09423c29f3195e87e6d792e31cc0c7ce5d7cd18 # Parent 94414cadfcaac070ba667229593848ac8917c990 mod_pubsub_github: Log debug message before attempting to publish This data is probably more useful in case of a traceback than after completing successfully diff -r 94414cadfcaa -r f09423c29f31 mod_pubsub_github/mod_pubsub_github.lua --- a/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 16:07:11 2019 +0200 +++ b/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 16:11:37 2019 +0200 @@ -26,6 +26,8 @@ return "Invalid JSON. From you of all people..."; end + module:log("debug", "Handling POST: \n%s\n", tostring(request.body)); + for _, commit in ipairs(data.commits) do local ok, err = pubsub_service:publish(node, true, data.repository.name, st.stanza("item", { id = data.repository.name, xmlns = "http://jabber.org/protocol/pubsub" }) @@ -44,7 +46,6 @@ end end - module:log("debug", "Handled POST: \n%s\n", tostring(request.body)); response.status_code = 202; return "Thank you Github!"; end