Name: mod_muc_log Purpose: MUC room logging Author: Badlop Type: Module Requirements: ejabberd 1.1.0 or newer. Recommended: web server
Features
- MUC:
- Information provided on top of page: Room title, JID, subject author, subject and configuration
- Room title and JID are links to join the chatroom (using XMPP-IRI)
- Subject and chatroom configuration changes are tracked and displayed
- Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available
- Timestamp includes seconds, providings are displayed is displagranularity of seconds
- HTML:
- XHTML 1.0 Transitional and CSS compliant
- Timestamps are self-referencing links
- Links on top for quicker navigation: Previous day, Next day, Up
- Extensive use of CSS for style definition
- URLs on messages and subjects are converted to hyperlinks
- Customization:
- Supports per-virtual host configuration
- access_log: allow or prevent chatroom owners to modify chatroom logging
- cssfile: specify an external CSS file
- timezone: specify wether to log timestamps local or GMT
- outdir: directory where output htmls wil be stored
- dirtype:to select two different directory and file name behaviours
- top_link: customizable link of top right corner
- Internationalization:
- All system strings are translatable as usual on ejabberd
- Date format on page top can be localized (on the source code only)
- Timezone used on timestamps is shown on the log files
Feature Comparison
This example output shows some features, like logging of configuration changes and kicks.
Feature | chatbot | neutron | sulci | mu-conference | mod_muc_log | Description |
Version | - | - | - | 0.7 | 1.1.3 | |
License | GPL | GPL | GPL | GPL | GPL | |
Price | free | free | free | free | free | |
Language | Perl | Python | Ocaml | C | Erlang | |
Server-independent | yes | yes | yes | yes | no (ejabberd) | |
Disabling support | yes | yes | yes | no | yes | Can logging be completely disabled by the administrator? |
Only admin can enable | yes | yes | yes | no | yes | Can the MUC service administrator prevent chatroom owner to modify the option? |
Owner auto-enable | no | no | no | yes | yes | Can chatroom owners enable logging without administrator supervision? |
Dirtype: plain | yes | no | no | yes | yes | The filename contains the full date: 2004-12-23.html |
Dirtype: subdirs | no | yes | yes | no | yes | Creates subdirectories for year and month: 2004/12/23.html |
Output format | txt | html | html | html/xml/txt | html | Logs are stored in <format>. |
Custom CSS | no | no | no | yes | yes | Is it possible to specify a custom CSS style sheet for the logs? |
Hyperlinks | no | yes | no | no | yes | URLs are converted to hyperlinks. |
Colored messages | no | yes | no | yes | yes | Messages like /me and /subject are colored. |
Chatroom JID | no | yes | yes | on header | yes | The chatroom JID is printed on top of each logfile. |
Chatroom date | no | yes | yes | on header | yes | The Date is printed on top of each logfile. |
Chatroom topic | no | no | no | no | yes | Indicate the chatroom topic on top of each logfile. |
Chatroom options | no | no | no | no | yes | Indicate the chatroom options on top of each logfile. |
Time granularity | sec | min | min | sec | sec | Time is expresed with granularity: minutes or seconds. |
Example | jabber.org | old jabber.ru | new jabber.ru | jabberfr.org | jabber.org | Chatroom log examples. |
Feature Requests
- Convert text like: '*this* is bold' to '<b>*this*</b> is bold', amongst others.
- If a chatroom is password protected, an Apache .htpasswd should be generated on that dir to require password validation
- If a chatroom is non-searchable, tell Apache to not show its directory
- In a non-anonymous room: replace nick names with <a href="xmpp:romeo@example.net">Locke</a>
- Log participants on top of log page
- Log participants roles and affiliation changes
- Anti-spam option to set nofollow in URLs
Related Links
- Initial patch was tracked on Bug 10: Chatroom logging support
how to disable join/part logging
In case one looks to reduce "noise", there isn't a knob but there's a patch:
http://lists.jabber.ru/pipermail/ejabberd/2010-May/006111.html
(a knob would be welcome either)
Log access
I've seen that it is possible to limit who can enable or disable logs, but is it possible to specify who can actually access them? I mean, I'd like to log all the conversations in the chatrooms, but I want only the admins of the server to access them.
Not directly possible
is it possible to specify who can actually access them? I mean, I'd like to log all the conversations in the chatrooms, but I want only the admins of the server to access them.
mod_muc_log just writes files. Then you configure a web server to allow users to read them.
If you installed Apache or similar, then you could manually write .htaccess files in the room dirs to grant individual privileges.
If you use mod_muc_log_http, that module doesn't implement such feature. It would be possible to develop access verification using code similar to ejabberd_web_admin.
Thanks!
Ok Badlop, I'll give a try with that then. The only problem is that we want admins and room creators to access the logs, so it'll be quite dynamical. But I guess a script in the server side controlling that will do the trick. Thank you very much anyway!
Config?
Hello,
what are the configuration options for mod_muc_log?
Regards
Pavel
Here
Hello Pavel,http://www.process-one.net/en/ejabberd/guide_en#htoc49
I guess you already found them, but they're here:
(Ok, I just saw that Pavel's post is like 2 years old, nevermind)
mod_muc_log file_format option not working
With the latest source version of ejabberd 2.0.5 the mod_muc_log file_format for plaintext is not working. Even after setting to plain text the output still shows into html format...have anyone tested it?
Is file_format available in 2.0.5?
> ejabberd 2.0.5 the mod_muc_log file_format
Check the documentation of your 2.0.5 version. Is file_format available?
This says the option will be available in ejabberd 2.1.0:MUC log files options: plaintext format; filename with only room name
Thank you very much!
Latest patched version of mod_muc_log appears to be working fine. Thanks for your help and your patience w/ me.
Rob
Mod_muc_log - text format option?
Is there anyway to change the output format to be plain text, instead of the HTML?
(my ejabberd install is on SUSE Linux, and have an Apache instance on the same server to handle serving the logs out to users on the web)
My customer prefers the MUC logs to be in text.
Thanks,
Rob
Try patch
That feature is not included in mod_muc_log, but there's a patch that implements text output and provides an option to select between HTML and text:MUC log files in text format
Thanks - one more suggestion
Badlop,
Thanks - that patch is perfect.
One more suggestion;
- a config option to allow the log to be written to a directory named only for the room (drop the node name).
Example - assuming;
- room name - foyer
- node name - chat.example.org
- outdir - /usr/local/ejabberd/roomlogs
The ejabberd.cfg mod_muc_log option;
- {dir_name, short}
would cause the logs to be written into /usr/local/ejabberd/roomlogs/foyer
- {dir_name, full} [default]
would cause the logs to be written into /usr/local/ejabberd/roomlogs/foyer@chat.example.org
[I am trying to mimic my customer's old system - to minimize the changes when I move them over a eJabberd install - and this is my last hurdle]
Thanks again,
Rob
Try this patch
Ok, feature implemented in thepatch mod_muc_log-dirname.diff .
mod_muc_log w/ Dirname patch
Badlop,
Diff file looks good - any chance to get the actual erl file to compile into my install?
Thanks,
Rob
Yes, check the ticket, it
Yes, check the ticket, it has an updated mod_muc_log.erl with the two patches.
Spoke to soon
Badlop - there is one issue.
When the configuration of the room is changed - it looks mod_muc_log is writing partial config info even into the text files.
This appears to have been acting this way - even w/ the first patch (that introduced the text formatted logs).
Here is a log snippet from a room when I updated the config;
<div class="rc">
<div class="rct" onclick="sh('a967725');return false;">Room Configuration</div>
<div class="rcos" id="a967725" style="display: none;" ><br/><div class="rcod">Room title</div><div class="rcoe">Allow users to chang
e subject</div><div class="rcoe">Allow users to send private messages</div><div class="rcod">Allow users to query other users</div><
div class="rcoe">Allow users to send invites</div><div class="rcod">Make room semianonymous</div><div class="rcoe">Enable logging</d
iv><div class="rcoe">Default users as participants</div><div class="rcod">Make room members-only</div><div class="rcod">Make room mo
derated</div><div class="rcod">Password</div><div class="rcod">Make room password protected</div><div class="rcoe">Make room persist
ent</div><div class="rcoe">Make room public searchable</div><div class="rcod">Make participants list public</div></div>
</div>
[16:48:45] Chatroom configuration modified
(it is writing both the updated HTML section and the simple note for the log - "Chatroom configuration modified").
Can the HTML formatted section of text be supressed when the log format is 'text'?
Rob
Ah, right. You can get the
Ah, right. You can get the fixed diff or erl files in the ticket page.
Both fixes work
Badlop,
Finally got a chance to test the latest version. Seems to work fine. Handles the room name only directory names - and the DIV block (on config changes) is suppressed in the text logging.
Thanks again for all of the help,
Rob