[ python-Feature Requests-1006786 ] extend strptime to understand
logging timestamps
SourceForge.net
noreply at sourceforge.net
Tue Aug 10 20:59:05 CEST 2004
Feature Requests item #1006786, was opened at 2004-08-10 13:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1006786&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Brett Cannon (bcannon)
Summary: extend strptime to understand logging timestamps
Initial Comment:
The default timestamp format used by the logging module
appends
a comma followed by a three-digit value representing
milliseconds,
e.g.:
2004-08-10 08:21:20,380 DEBUG <mytag> log message here
It would be nice if time.strptime() grokked this
specification for
the seconds in a timestamp so that applications which
want to
analyze log files can do so more easily. One
possibility is to
add a %s format specifier which recognizes NN,MMM as a
floating point value containing fractional seconds with
a comma
as the "decimal point".
Attached is a simple patch. I chose %s as the format
sequence
since it is related to %S.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1006786&group_id=5470
More information about the Python-bugs-list
mailing list