[Tutor] Python time hour formatting
Michael Janssen
Janssen at rz.uni-frankfurt.de
Sat Mar 27 10:47:36 EST 2004
On Fri, 26 Mar 2004 tpc at csua.berkeley.edu wrote:
> argh! You're right. What's frustrating is that I would like to implement
> this feature on a Window's machine, to print at the beginning of each
> error log entry.
BTW: having a leading 0 in log entries is a very good thing when it
ever comes to automated loganalyzing. With leading zeros you can do
things as easy as cutting off the time with just a slice: line[26:]
Where this is especially usefull while analyzing the data on
commandline it's allways not that bad to have a fixed-sized time
format. Don't try to do it the same way as syslog - syslog's time
format is broken in respect of missing leading 0 and missing year.
Michael
More information about the Tutor
mailing list