RE: Sorting out of sequence log Apache log file
- From: "Chris W. Parker" <cparker@xxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 13:11:49 -0700
Ray Van Dolson <mailto:rayvd@xxxxxxxxxxxxxxx>
on Wednesday, April 26, 2006 12:43 PM said:
I assume by out of sequence you mean the time stamps are all off?
Yes.
The following quickie Python hack works for me. Basically call it as
follows:
% cat access_log | /path/to/sort_apache.py > sorted_log.log
Thanks Ray. I had some issues with the indentation originally (never
used Python before) but I've got that sorted out now.
If it's a huge logfile the script may give you some problems.
Basically it reads in all the lines in the file and sorts by the date
and time and then spits it out in the right order.
Thanks for the heads up.
Chris.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Prev by Date: Re: Sorting out of sequence log Apache log file
- Next by Date: RE: Sorting out of sequence log Apache log file
- Previous by thread: Re: Sorting out of sequence log Apache log file
- Next by thread: RE: Sorting out of sequence log Apache log file
- Index(es):
Relevant Pages
- Re: OT - trivial programming language
... |> That makes two votes for Python. ... If you think indentation doesn't
matter, join any C, C++ or Java ... keyboard engraved with the label 'Tab' is pressed.
... If you use vim, set the following options. ... (Debian-User) - Re: A decorator syntax not yet mentioned (I think!)
... Because to me it doesn't *act* like normal Python. ... except for the few that
are based on indentation ... It seems like we both agree that the @pie syntax doesn't
... (comp.lang.python) - Re: Hows ruby compare to it older brother python
... >>to Perl than to Python. ... > as syntax and Ruby doesn't.
... As I said in another post, indentation is the reason I learned ... (comp.lang.python) - Re: Python indentation
... > I am a beginner in Python, and am wondering what is it about the indentation ...
> in Python, without which python scripts do not work properly. ... In many languages,
such as C or Perl, you can write readable code, but ... but the script is much more readable
than the Perl counterpart ... (comp.lang.python) - Re: Python syntax in Lisp and Scheme
... necessity in some hypothetical python)) or you're dealing with a misfeature ...
setting up and converting between various C indentation schemes ... I explicitly disclaimed
that changing lisp to structuring indentation ... > you can easy implement it in Common-Lisp.
... (comp.lang.lisp)