I’'ve attached a png image of the log viewer itself to whet your appetites. It shows the main points of the application. Appearance is a little bland at the moment. No screen shot for the Perl script - no output on stdout (hopefully none on stderr either!).
The context menu - Focus this type lets you easily focus in on a chat or a series of messages between two users, without having to set the filter via the filter window. Focus all types selects all types of message between the two users. The last one is handy here as lots of users still haven’'t got to grips with the difference between chat and message. The Filter window allows you to select from all available users (that are listed in the log file) and view various types of message between them.
For the list of users, the application strips off the domain section of the JID and assumes that if the first portion has a . in it then it is Firstname.Surname and uses proper case on the username (only for display - the original message is stored intact).
Currently, the application only reads the dated log file, however, I will get around to enabling this to be entered into a database.
I’'ll do a little work on putting some of the hard coded settings in the log viewer into some sort of config file to make things easier. Hopefully being able to post the code in the next few days.
Sorry, no smilies in the message window , not yet at least. I’'m using a RichText control and displaying images is a little involved if you want to avoid using the clipboard.
I have also attached the Perl script that splits the audit logs into dated files. This should work on both Windows and Linux, the path separator really being the only difference.
The Perl script can take 4 options:
-o specify an offset in days previous to the current day. I.e -o “-1” for yesterday
Default is 0 i.e. today. I suppose that means you can supply and offset for a future date, but that won’'t get you anywhere
-O output location for the dated log file
Default is ./logs (I think this works on Windows regardless of the / separator)
-l location of the jive audit files
Default is /opt/jive_messenger/logs (no idea where the default is on Windows)
-f a template for the audit file
Default is jive.audit-*.log. The script then ‘‘globs’’ all matching files.
The output log file is named yyyy-mm-dd.log and is in the same format as the original, just containing the message packets from the specified date.
The current BIG assumption in the Perl script is that the message packet dates are in the form: Fri Jun 02 09:35:00 BST 2005, with BST and GMT being used depending on daylight savings being in effect. I’'m sure someone can point out the error of my ways here.
Actually, the Log viewer makes this assumption as well (as that is the format our logs take).
Hope this helps a few people.
Message was edited by: