Software /
code /
prosody
Changeset
1877:23c39f66406f
xmppserver_listener: Better log messages on invalid XML
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 04 Oct 2009 14:15:36 +0100 |
parents | 1876:6d33e0521667 |
children | 1878:a8d57d5faec5 |
files | net/xmppserver_listener.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppserver_listener.lua Sun Oct 04 14:10:24 2009 +0100 +++ b/net/xmppserver_listener.lua Sun Oct 04 14:15:36 2009 +0100 @@ -61,7 +61,8 @@ 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