This was a long time ago But just in case anyone googling ever has
the same question, this is what I did (last year). The user just needs
to supply a strftime formatted string, such as "%A, %e %b %h:%M" and
this Class figures out the regex to use on the log entries...
class RegexBuilder(object
That, my friend, is ingenious...!
Thankyou
SM
2009/2/3 andrew cooke
> > > ValueError: unconverted data remains: this is the remainder of the log
>
> > > line
> > > that I do not care about
>
> you could catch the ValueError and split at the ':' in the .args
> attribute to find the extra data.
> > ValueError: unconverted data remains: this is the remainder of the log
> > line
> > that I do not care about
you could catch the ValueError and split at the ':' in the .args
attribute to find the extra data. you could then find the extra data
in the original string, use the index to remove
En Tue, 03 Feb 2009 11:52:07 -0200, Simon Mullis
escribió:
I'm writing a script to help with analyzing log files timestamps and
have a
very specific question on which I'm momentarily stumped
I'd like the script to support multiple log file types, so allow a
strftime
format to be pas
Simon Mullis wrote:
> Hi All
>
> I'm writing a script to help with analyzing log files timestamps and
> have a very specific question on which I'm momentarily stumped
>
> I'd like the script to support multiple log file types, so allow a
> strftime format to be passed in as a cli switch (defau
Hi All
I'm writing a script to help with analyzing log files timestamps and have a
very specific question on which I'm momentarily stumped
I'd like the script to support multiple log file types, so allow a strftime
format to be passed in as a cli switch (default is %Y-%m-%d %H:%M:%S).
When i