Parsing Logs...Please Advise
sensei zeki
xozip at hotmail.com
Wed Sep 18 00:04:50 EDT 2002
I am looking for a good tool to parse system logs. While I am familiar with
the concepts of several languages, I have never acutally used them directly.
I know phyton is a good text tool, but is it the one I should use? or
should I use awk, perl, or sed?
Thanks for any advice...
An example log looks like this...
-----------------------------------
Begin
-----------------------------------
Fri Jun 21 14:38:56 2002 Entered ROTATION
Fri Jun 21 14:40:37 2002 New customer has inserted $5.00. (bill)
Fri Jun 21 14:42:30 2002 studio: animating (#1)...
Fri Jun 21 14:42:30 2002 animation: 1
Fri Jun 21 14:44:07 2002 hwpcl: dithering...
Fri Jun 21 14:44:09 2002 hwpcl: downloading...
Fri Jun 21 14:44:13 2002 hwpcl: done.
Fri Jun 21 14:44:34 2002 Customer has bought 1 print(s) of Pic 0.
Fri Jun 21 14:44:35 2002 Entered ROTATION
Fri Jun 21 15:19:48 2002 New customer has inserted $5.00. (bill)
Fri Jun 21 15:22:34 2002 studio: animating (#5 warped)...
Fri Jun 21 15:22:34 2002 animation: 15
Fri Jun 21 15:24:01 2002 hwpcl: dithering...
Fri Jun 21 15:24:03 2002 hwpcl: downloading...
Fri Jun 21 15:24:07 2002 hwpcl: done.
Fri Jun 21 15:24:28 2002 Customer has bought 1 print(s) of Pic 0.
Fri Jun 21 15:24:29 2002 Entered ROTATION
Fri Jun 21 16:55:52 2002 New customer has inserted $5.00. (bill)
Fri Jun 21 16:59:04 2002 studio: animating (#1)...
Fri Jun 21 16:59:04 2002 animation: 1
Fri Jun 21 17:00:27 2002 hwpcl: dithering...
Fri Jun 21 17:00:29 2002 hwpcl: downloading...
Fri Jun 21 17:00:33 2002 hwpcl: done.
Fri Jun 21 17:00:55 2002 Customer has bought 1 print(s) of Pic 0.
Fri Jun 21 17:00:56 2002 Entered ROTATION
-------------------------------------------------------
END
-------------------------------------------------------
More information about the Python-list
mailing list