Serialize unknown stanza before logging.

Sun, 28 Jun 2009 11:49:25 -0500

author
nolan@nolan-eee
date
Sun, 28 Jun 2009 11:49:25 -0500
changeset 1442
df9d78544f34
parent 1434
b5d4db71ef1a
child 1443
c727348c7e63

Serialize unknown stanza before logging.

core/componentmanager.lua file | annotate | diff | comparison | revisions
--- a/core/componentmanager.lua	Sun Jun 28 08:09:57 2009 -0500
+++ b/core/componentmanager.lua	Sun Jun 28 11:49:25 2009 -0500
@@ -17,6 +17,7 @@
 local events_new = require "util.events".new;
 local st = require "util.stanza";
 local hosts = hosts;
+local serialize = require "util.serialization".serialize
 
 local pairs, type, tostring = pairs, type, tostring;
 
@@ -75,7 +76,7 @@
 		log("debug", "%s stanza being handled by component: %s", stanza.name, host);
 		component(origin, stanza, hosts[host]);
 	else
-		log("error", "Component manager recieved a stanza for a non-existing component: " .. (stanza.attr.to or stanza));
+		log("error", "Component manager recieved a stanza for a non-existing component: " .. (stanza.attr.to or serialize(stanza)));
 	end
 end
 

mercurial