Log URL called by http_roster_admin

Thu, 12 Jan 2017 09:49:32 +0000

author
JC Brand <jc@opkode.com>
date
Thu, 12 Jan 2017 09:49:32 +0000
changeset 2441
68ebc52222dc
parent 2440
7814a5c7fee8
child 2442
b2a198665946

Log URL called by http_roster_admin

mod_http_roster_admin/mod_http_roster_admin.lua file | annotate | diff | comparison | revisions
--- a/mod_http_roster_admin/mod_http_roster_admin.lua	Tue Jan 10 14:11:56 2017 +0100
+++ b/mod_http_roster_admin/mod_http_roster_admin.lua	Thu Jan 12 09:49:32 2017 +0000
@@ -127,6 +127,7 @@
 function fetch_roster(username, cb)
 	local x = {headers = {}};
 	x["headers"]["ACCEPT"] = "application/json, text/plain, */*";
+	module:log("debug", "Fetching roster at URL: %s", roster_url:format(username));
 	local ok, err = http.request(
 		roster_url:format(username),
 		x,
@@ -143,7 +144,6 @@
 			cb(true, code, json.decode(roster_data));
 		end
 	);
-	module:log("debug", "fetch_roster: ok is %s", ok);
 	if not ok then
 		module:log("error", "Failed to connect to roster API at %s: %s", roster_url:format(username), err);
 		cb(false, 0, err);

mercurial