[Patches] [ python-Patches-767600 ] Add a 'isotime' format to standard logging

SourceForge.net noreply@sourceforge.net
Sun, 13 Jul 2003 16:25:39 -0700


Patches item #767600, was opened at 2003-07-08 08:04
Message generated for change (Comment added) made by vsajip
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=767600&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Anthony Baxter (anthonybaxter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add a 'isotime' format to standard logging

Initial Comment:
This patch adds a standard format string 'isotime' to go 
alongside 'asctime' in the standard logging module. The
'asctime' format is somewhat idiosyncratic (for
instance the
seconds,milliseconds part). 'isotime' produces UTC
timestamps 
in ISO8601 format, that is
%Y-%m-%dT%H:%M:%S.msecsZ
e.g.
2003-07-08T18:02:34.012Z

A good primer on ISO 8601 can be found at 
http://www.cl.cam.ac.uk/~mgk25/iso-time.html

I'm not entirely sold on the name 'isotime' - an
alternative
would be 'stdtime'. 



----------------------------------------------------------------------

Comment By: Vinay Sajip (vsajip)
Date: 2003-07-13 23:25

Message:
Logged In: YES 
user_id=308438

The current implementation is supposed to produce ISO8601 
format by default, unless a specific date format is specified 
for the formatter. According to the above web page, the only 
way in which the current default format is non-standard is 
that no 'Z' is provided to indicate a UTC time; so I think the 
patch should not introduce a new 'stdtime' or 'isotime' format, 
but rather change the current formatting implementation so 
that the standard format is actually produced.

Currently, the millisecond separator is a comma (like log4j); 
Markus Kuhn's above page indicates that either a comma or a 
period are acceptable for this.

Of course, it may be that better support for standard 
date/time formats should not be implemented in logging, but 
in a general-purpose package which can be used not only by 
logging, but by other applications which need this 
functionality.

Anthony, nice to see that you are taking another look at 
logging :-)

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-07-08 08:35

Message:
Logged In: YES 
user_id=21627

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=767600&group_id=5470