--- a/mod_rawdebug/mod_rawdebug.lua Tue Jan 20 11:02:14 2015 +0000
+++ b/mod_rawdebug/mod_rawdebug.lua Sun Jan 25 13:04:02 2015 +0100
@@ -19,14 +19,15 @@
end
end
-function rawdebug:enable(sessionid)
+function rawdebug:enable(sessionid, typ)
local session = full_sessions[sessionid];
+ typ = typ or "stanzas";
if not session then
return nil, "No such session";
end
local f = {
- ["stanzas/in"] = new_logger(session.log or log, "RECV");
- ["stanzas/out"] = new_logger(session.log or log, "SEND");
+ [typ .. "/in"] = new_logger(session.log or log, "RECV");
+ [typ .. "/out"] = new_logger(session.log or log, "SEND");
};
for type, callback in pairs(f) do
filters.add_filter(session, type, callback)