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

SourceForge.net noreply at sourceforge.net
Thu Jan 1 02:40:06 EST 2004


Patches item #767600, was opened at 2003-07-08 03:04
Message generated for change (Settings changed) made by rhettinger
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: Vinay Sajip (vsajip)
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 18: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 03: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



More information about the Patches mailing list