Mercurial > prosody-modules
changeset 3567:179424d557f2
mod_admin_web: Fix to use format strings in logger calls (thanks Ge0rG)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 30 Apr 2019 10:45:00 +0100 |
parents | b50be75c8bef |
children | 6b3181fe5617 |
files | mod_admin_web/admin_web/mod_admin_web.lua |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_admin_web/admin_web/mod_admin_web.lua Mon Apr 29 00:05:20 2019 +0200 +++ b/mod_admin_web/admin_web/mod_admin_web.lua Tue Apr 30 10:45:00 2019 +0100 @@ -56,7 +56,7 @@ item:tag("compressed"):up(); end service[host]:publish(xmlns_c2s_session, host, id, item); - module:log("debug", "Added client " .. name); + module:log("debug", "Added client %s", name); end local function del_client(session, host) @@ -96,7 +96,7 @@ item:tag("compressed"):up(); end service[host]:publish(xmlns_s2s_session, host, id, item); - module:log("debug", "Added host " .. name .. " s2s" .. type); + module:log("debug", "Added host %s s2s%s", name, type); end local function del_host(session, type, host) @@ -219,7 +219,7 @@ -- Create node for s2s sessions local ok, err = service[module.host]:create(xmlns_s2s_session, true); if not ok then - module:log("warn", "Could not create node " .. xmlns_s2s_session .. ": " .. tostring(err)); + module:log("warn", "Could not create node %s: %s", xmlns_s2s_session, err); else service[module.host]:set_affiliation(xmlns_s2s_session, true, module.host, "owner") end @@ -241,7 +241,7 @@ -- Create node for c2s sessions ok, err = service[module.host]:create(xmlns_c2s_session, true); if not ok then - module:log("warn", "Could not create node " .. xmlns_c2s_session .. ": " .. tostring(err)); + module:log("warn", "Could not create node %s: %s", xmlns_c2s_session, tostring(err)); else service[module.host]:set_affiliation(xmlns_c2s_session, true, module.host, "owner") end