aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-07-23 17:32:33 +0100
committerMatthew Wild <mwild1@gmail.com>2012-07-23 17:32:33 +0100
commite89b006f03f692a7e807c54757f0623302c40b85 (patch)
tree9c9c3219211b2f9e2eca26d188f9f44924922db7 /core/rostermanager.lua
parentbadc4159d600642f97d064a7f74c2ff68dda8abf (diff)
downloadprosody-e89b006f03f692a7e807c54757f0623302c40b85.tar.gz
prosody-e89b006f03f692a7e807c54757f0623302c40b85.zip
Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 59ba6579..524b61be 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -83,15 +83,15 @@ end
function load_roster(username, host)
local jid = username.."@"..host;
- log("debug", "load_roster: asked for: "..jid);
+ log("debug", "load_roster: asked for: %s", jid);
local user = bare_sessions[jid];
local roster;
if user then
roster = user.roster;
if roster then return roster; end
- log("debug", "load_roster: loading for new user: "..username.."@"..host);
+ log("debug", "load_roster: loading for new user: %s@%s", username, host);
else -- Attempt to load roster for non-loaded user
- log("debug", "load_roster: loading for offline user: "..username.."@"..host);
+ log("debug", "load_roster: loading for offline user: %s@%s", username, host);
end
local data, err = datamanager.load(username, host, "roster");
roster = data or {};
@@ -99,7 +99,7 @@ function load_roster(username, host)
if not roster[false] then roster[false] = { broken = err or nil }; end
if roster[jid] then
roster[jid] = nil;
- log("warn", "roster for "..jid.." has a self-contact");
+ log("warn", "roster for %s has a self-contact", jid);
end
if not err then
hosts[host].events.fire_event("roster-load", username, host, roster);
@@ -108,7 +108,7 @@ function load_roster(username, host)
end
function save_roster(username, host, roster)
- log("debug", "save_roster: saving roster for "..username.."@"..host);
+ log("debug", "save_roster: saving roster for %s@%s", username, host);
if not roster then
roster = hosts[host] and hosts[host].sessions[username] and hosts[host].sessions[username].roster;
--if not roster then
@@ -238,7 +238,7 @@ function set_contact_pending_out(username, host, jid) -- subscribe
roster[jid] = item;
end
item.ask = "subscribe";
- log("debug", "set_contact_pending_out: saving roster; set "..username.."@"..host..".roster["..jid.."].ask=subscribe");
+ log("debug", "set_contact_pending_out: saving roster; set %s@%s.roster[%q].ask=subscribe", username, host, jid);
return save_roster(username, host, roster);
end
function unsubscribe(username, host, jid)