logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant Patil <prashant_pa...@persistent.co.in>
Subject FW: Parsing Log4j log file
Date Wed, 05 May 2010 10:38:54 GMT




Hi Jacob,



I tried as you suggested by using LogFilePatternReceiver.



And I succeeded to parse the log4j log file using this class. Thanks.



If anybody want help on this please let me know.




          Warm Regards,
    Prashant
 Persistent Systems Limited
                [cid:image001.jpg@01CAEC6C.B19E38C0]
      One Earth...One Chance...
                Go Green !


-----Original Message-----
From: Prashant Patil [mailto:prashant_patil@persistent.co.in]
Sent: Tuesday, April 27, 2010 8:28 PM
To: Log4J Users List
Subject: RE: FW: Parsing Log4j log file



Hi Jacob,







Thanks for very valuable response!







Yes I need to store the information retrieved from the log file to the database.



That's why I couldn't use this tool directly.







Your 1st and 2nd approaches I think could be useful. Will explore it and let you know.







Thanks a lot.











regards,



Prashant











-----Original Message-----

From: Jacob Kjome [mailto:hoju@visi.com]

Sent: Tuesday, April 27, 2010 8:05 PM

To: Log4J Users List

Subject: Re: FW: Parsing Log4j log file







I would either use Chaisaw II [1] or look at the code it uses to read log



files.  It can read XML formatted files as well as regular log files, as long



as you give it the pattern the log was written in.  See the



LogFilePatternReciever [2].  Chainsaw can even read a remote file using the



VFSLogFilePatternReciever [3], so I would suggest using the tool rather than



writing the app yourself unless you have very unique requirements.











[1] http://logging.apache.org/chainsaw/index.html



[2]



http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/varia/LogFilePatternReceiver.html



[3]



http://logging.apache.org/chainsaw/apidocs/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.html











Jake











On Tue, 27 Apr 2010 17:57:43 +0530



  Prashant Patil <prashant_patil@persistent.co.in> wrote:



> Hi Douglas,



>



> Thanks for the response.



>



> But the problem with that approach is that there are n number of log files



>already exist. And those are not in XMLLayout.



>



> So This approach wouldn't be useful here.



>



> Please let me know if any other efficient solution for this.



>



> regards,



> Prashant



>



>



> -----Original Message-----



>From: Douglas E Wegscheid [mailto:Douglas_E_Wegscheid@whirlpool.com]



> Sent: Tuesday, April 27, 2010 5:22 PM



> To: Log4J Users List



> Cc: log4j-user@logging.apache.org



> Subject: Re: FW: Parsing Log4j log file



>



> one approach, use the XmlLayout, and then you can use your favorite XML



> parsing API to parse the file.



>



> Douglas E Wegscheid



> Lead Technical Analyst, Whirlpool Corporation



> (269)-923-5278



>



> "A wrong note played hesitatingly is a wrong note. A wrong note played



> with conviction is interpretation."



>



>



>



>



>



> Prashant Patil <prashant_patil@persistent.co.in>



> 04/27/2010 05:56 AM



> Please respond to



> "Log4J Users List" <log4j-user@logging.apache.org>



>



>



> To



> "log4j-user@logging.apache.org" <log4j-user@logging.apache.org>



> cc



>



> Subject



>FW: Parsing Log4j log file



>



>



>



>



>



>



>



>



>



> Hi,



>



> I want to read the log4j log file in my program and want to search some



> information from the log file.



>



> If there is any API available for log file parsing/reading, Please let me



> know.



>



> regards,



> Prashant



>



>



> DISCLAIMER



> ==========



> This e-mail may contain privileged and confidential information which is



> the property of Persistent Systems Ltd. It is intended only for the use of



> the individual or entity to which it is addressed. If you are not the



> intended recipient, you are not authorized to read, retain, copy, print,



> distribute or use this message. If you have received this communication in



> error, please notify the sender and delete all copies of this message.



> Persistent Systems Ltd. does not accept any liability for virus infected



> mails.



>



>



> DISCLAIMER



> ==========



> This e-mail may contain privileged and confidential information which is the



>property of Persistent Systems Ltd. It is intended only for the use of the



>individual or entity to which it is addressed. If you are not the intended



>recipient, you are not authorized to read, retain, copy, print, distribute or



>use this message. If you have received this communication in error, please



>notify the sender and delete all copies of this message. Persistent Systems



>Ltd. does not accept any liability for virus infected mails.



>



> ---------------------------------------------------------------------



> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org



>For additional commands, e-mail: log4j-user-help@logging.apache.org



>



>











---------------------------------------------------------------------



To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org



For additional commands, e-mail: log4j-user-help@logging.apache.org







DISCLAIMER

==========

This e-mail may contain privileged and confidential information which is the property of Persistent
Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed.
If you are not the intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems Ltd. does not accept
any liability for virus infected mails.

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent
Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed.
If you are not the intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems Ltd. does not accept
any liability for virus infected mails.

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message