M. Dietrich added the comment:
thanks, it will be really helpful for me to have this fixed.
as i consider this a "bug" it would be possible to "fix" this for 2.7 and yes
you are right, i talked about 2.7 as we are still using this version in
production.
--
sta
M. Dietrich added the comment:
for a logging library the important thing would be to not loose the information
that was meant to log. as i said i do alot of long-running huge-data-processing
scripts in py using the library. if the logging breaks but doesnt log what was
intended to log i judge
M. Dietrich added the comment:
yes, seeing the erranous line where the wrong formatstring comes from is nice
but sometimes (for myself: often) i need to know what actually was tried to be
logged. this information is lost in both cases.
this is especially sad if you have long-running processes
New submission from M. Dietrich:
in logging/__init__.py line 328 there is a simple line:
msg = msg % self.args
if that line fails this failure will be logged, not the line itself. i suggest
to change the line to something like:
try: msg = msg % self.args
except TypeError: msg
M. Dietrich added the comment:
i am not shure what the code snippet shall proove but shouldnt't it read
from datetime import datetime
a_datetime = datetime.now()
a_datetime = a_datetime.replace(microsecond = 1)
iso_str = a_datetime.isoformat()
b_datetime = datetime.strptime(iso_str, &