|
jabberd14 1.6.2
|
write a log entry if a session ends, optionally forward all messages to a configured entity More...
#include "jsm.h"Functions | |
| void | mod_log (jsmi si) |
write a log entry if a session ends, optionally forward all messages to a configured entity
This module only logs ending sessions. (It expects that the beginning of a session is logged by the client connection manager which is able to log the IP address if required as well.)
The module can be configured to forward all message stanzas to a configured entity on the router. The message forwarding is configured using the <archive/> element containing a <service/> element for each destination having the destination's address as the CDATA node in it. The messages are then forwarded using a <route/> element, therefore you cannot forward messages to entities not connected to your router (you cannot use s2s).
The message forwarding functionallity is disabled if there is no <archive/> element in the configuration of the session manager.
mod_log should be the last in the list of modules in the session manager.
| void mod_log | ( | jsmi | si | ) |
init the mod_log in the session manager
build the list of forwarding destinations for the message logging functionallity (using the <service/> elements inside the <archive/> element in the configuration of the session manager)
register mod_log_session as callback for new sessions
| si | the session manager instance |
References e_DESERIALIZE, e_SESSION, j_strcmp(), jid_append(), jid_new(), js_config(), js_mapi_register(), log_debug2, LOGT_INIT, NTYPE_TAG, jsmi_struct::p, xmlnode_free(), xmlnode_get_data(), xmlnode_get_firstchild(), xmlnode_get_localname(), xmlnode_get_nextsibling(), xmlnode_get_type(), and ZONE.
1.7.4