[issue18671] enhance formatting in logging package

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a206f952668e by Vinay Sajip in branch 'default': Closes #18671: Output more information when logging exceptions occur. http://hg.python.org/cpython/rev/a206f952668e -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected sta

[issue18671] enhance formatting in logging package

2013-08-07 Thread Vinay Sajip
Vinay Sajip added the comment: Sorry, not for 2.7 - it's not a bug. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue18671] enhance formatting in logging package

2013-08-07 Thread M. Dietrich
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. -- status: pending -> open ___

[issue18671] enhance formatting in logging package

2013-08-07 Thread Vinay Sajip
Vinay Sajip added the comment: >From the line number you mentioned, it looks like you're talking about Python >2.7. However, Python 2.7 is closed to new features: generally speaking, only >bug fixes are supposed to be committed to this branch. I can consider expanding the "Logged from ..." err

[issue18671] enhance formatting in logging package

2013-08-07 Thread M. Dietrich
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

[issue18671] enhance formatting in logging package

2013-08-06 Thread Vinay Sajip
Vinay Sajip added the comment: The location of the error isn't lost - that's the important thing. If it's that important that you never lose the parameters of a logging call, then you could just double check the formatting for errors, or use a specialised message object, as described in the do

[issue18671] enhance formatting in logging package

2013-08-06 Thread M. Dietrich
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

[issue18671] enhance formatting in logging package

2013-08-06 Thread Vinay Sajip
Vinay Sajip added the comment: In recent versions of Python, information *is* printed which allows pinpointing the source of the formatting error. Consider the following script, logex.py: import logging logger = logging.getLogger(__name__) def test(): logger.debug('The result is ', 'abc')

[issue18671] enhance formatting in logging package

2013-08-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18671] enhance formatting in logging package

2013-08-06 Thread M. Dietrich
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 = '