diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/rostermanager.lua | 12 | ||||
-rw-r--r-- | core/s2smanager.lua | 4 | ||||
-rw-r--r-- | core/sessionmanager.lua | 2 |
3 files changed, 9 insertions, 9 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) diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 5fe3a375..ece90e8f 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -87,7 +87,7 @@ function mark_connected(session) local from, to = session.from_host, session.to_host; - session.log("info", session.direction.." s2s connection "..from.."->"..to.." complete"); + session.log("info", "%s s2s connection %s->%s complete", session.direction, from, to); local event_data = { session = session }; if session.type == "s2sout" then @@ -105,7 +105,7 @@ function mark_connected(session) if session.direction == "outgoing" then if sendq then - session.log("debug", "sending "..#sendq.." queued stanzas across new outgoing connection to "..session.to_host); + session.log("debug", "sending %d queued stanzas across new outgoing connection to %s", #sendq, session.to_host); for i, data in ipairs(sendq) do send(data[1]); sendq[i] = nil; diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index bd9255a2..f542c021 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -38,7 +38,7 @@ function new_session(conn) getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; end open_sessions = open_sessions + 1; - log("debug", "open sessions now: ".. open_sessions); + log("debug", "open sessions now: %d", open_sessions); local filter = initialize_filters(session); local w = conn.write; |