LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2005, 05:54 PM   #1
Buto
Member
 
Registered: Sep 2004
Location: So Cal
Distribution: Slackware 12
Posts: 60

Rep: Reputation: 16
Log Reader


My boss recently wanted me to start monitoring the jabber logs for inappropriate use. The log is formatted like an html document and has no easy way of reading it. Is there a simple script I can make to display the log into a easier way of reading? Like...

Time SenderUsername to ReceiverUsername: The message goes here.....

Below is how the log formats everything, it's all one line btw:

Code:
<log time='20050208T17:51:09;><message id='jim_id_1382' to='SenderUsername@domain.com' type='chat' from='ReceiverUsername@domain.com/Jabber Instant Messenger'><x xmlns='jabber:x:event'><composing/></x><html xmlns='http://www.w3.org/1999/xhtml'><body><span style='font-family: Arial; margin:0; padding:0; font-size: 10pt'>Message goes here blah blah</span><br/></body></html><thread>3CFE0E4822DA63FA4AD2C5CD3AB3FEBC</thread><body>Message goes here blah blah</body></message></log>
 
Old 02-10-2005, 09:39 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If you know/learn Perl, try this module: http://search.cpan.org/~reatmon/Net-.../Jabber/Log.pm
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HP Photosmart 7550 w/ Flash Card Reader on Suse 9.3. Card Reader and Print Sharing Desert Linux - Hardware 0 07-25-2005 08:25 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 01:21 PM
pppd logging to /var/log/ppp.log problem mrtwice Linux - Software 1 01-10-2004 05:38 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration