aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-04 14:15:36 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-04 14:15:36 +0100
commit12f79d73cf55a06bd2b8f865b1b01fa0a925a468 (patch)
treedfc6e8ee1eccad2f47b0e57285deac735a647ef5 /net
parent98486d8800ec95cce2dbd9a903e5419f65e38c78 (diff)
downloadprosody-12f79d73cf55a06bd2b8f865b1b01fa0a925a468.tar.gz
prosody-12f79d73cf55a06bd2b8f865b1b01fa0a925a468.zip
xmppserver_listener: Better log messages on invalid XML
Diffstat (limited to 'net')
-rw-r--r--net/xmppserver_listener.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index 6a196446..c3234409 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -61,7 +61,8 @@ local function session_reset_stream(session)
function session.data(conn, data)
local ok, err = parser:parse(data);
if ok then return; end
- log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "));
+ session.log("warn", "Received invalid XML: %s", data);
+ session.log("warn", "Problem was: %s", err);
session:close("xml-not-well-formed");
end