hemanthc has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to extract parts of a text log file. The format is kind of fixed, I can always write code to retrieve the important parts, but I am trying to look for a generic way - or a framework that already does this.
I am looking for something simple and lightweight.
In case the requirement is not clear, the log file has a format like:
my_header (.*) ... time: (.*) ... [error: (.*)] ... status: (.*) ... end_signature
Basically, this contains some lines that may be matched (those enclosed in []s) and some lines that must be matched (those not). Also, it would be interesting if there is a way to specify that the some line need not be at any given location.
If anyone has any pointers on how I can achieve this, I would really appreciate it.
Thanking you in advance,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Log File Extracter
by jdporter (Paladin) on Jul 24, 2007 at 20:05 UTC | |
|
Re: Log File Extracter
by hemanthc (Initiate) on Jul 24, 2007 at 13:12 UTC |