This module sniffs all the user messages send through ejabberd. It logs messages to selected database (mnesia, mysql, pgsql). The logged messages can be viewed through ejabberd web admin interface. Module settings and per user settings can be changed by admin/user via ad-hoc commands. User logging settings can be changed via web admin console.
Note that this module is intended for administrators that need to log their users. It is not possible for the users to view their own messages (you can install the web application Jorge for that topic).