[issue34334] QueueHandler logs exc_info twice

2018-10-06 Thread Ned Deily
Ned Deily added the comment: New changeset 1a2189353f744f79a43511707c090c3807a4978e by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34334: Don't log traceback twice in QueueHandler (GH-9537) (GH-9581) https://github.com/python/cpython/commit/1a2189353f744f79a43511707c090c3807a4978e

[issue34334] QueueHandler logs exc_info twice

2018-10-06 Thread Ned Deily
Change by Ned Deily : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +8982 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset d345bb4d9b6e16c681cd8a4e1fff94ecd6b0bb09 by Vinay Sajip (Cheryl Sabella) in branch 'master': bpo-34334: Don't log traceback twice in QueueHandler (GH-9537) https://github.com/python/cpython/commit/d345bb4d9b6e16c681cd8a4e1fff94ecd6b0bb09

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Great, thanks. I've made the other changes to the PR. -- ___ Python tracker ___ ___

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread Vinay Sajip
Vinay Sajip added the comment: > I'm wondering if there should be a change to `format()` to add an else There's no need; the field is initialised to None in the LogRecord constructor and then only set later if there is a traceback to be cached. > I think the cutoff for 3.7.1 was yesterday,

[issue34334] QueueHandler logs exc_info twice

2018-09-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hi Vinay, Thanks for the explanation! I'm good with changing the PR. I do have one question though. You wrote - > but I forgot that record.exc_text should also be zapped, as it should always > reflect the contents of record.exc_info. Based on the

[issue34334] QueueHandler logs exc_info twice

2018-09-24 Thread Vinay Sajip
Vinay Sajip added the comment: Having looked at it again, Adrian Dries might be right that setting exc_text to None will also do the trick, and perhaps in a better way. The reasoning: Handler.format() formats record.msg % record.args, and caches it in record.message. If there is exception

[issue34334] QueueHandler logs exc_info twice

2018-09-24 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +8939 stage: -> patch review ___ Python tracker ___ ___

[issue34334] QueueHandler logs exc_info twice

2018-09-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: I debugged this issue and found that `format()` is being called twice and appending the traceback twice. The first call - QueueHandler.emit() -> QueueHandler.prepare() -> self.format() (which is the default Formatter) -- this gets called with self.msg =

[issue34334] QueueHandler logs exc_info twice

2018-08-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34334] QueueHandler logs exc_info twice

2018-08-25 Thread Vinay Sajip
Vinay Sajip added the comment: Possibly a test needs to be added for this, as it appears to be a regression that went unnoticed. -- ___ Python tracker ___

[issue34334] QueueHandler logs exc_info twice

2018-08-25 Thread Vinay Sajip
Vinay Sajip added the comment: > Patching QueueHandler.prepare() to set exc_text to None seems to fix this. I'm not sure that's the right fix. The change appears to have come from this commit: https://github.com/python/cpython/commit/adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 Specifically,

[issue34334] QueueHandler logs exc_info twice

2018-08-25 Thread Danish Prakash
Danish Prakash added the comment: I would like to work on this, just making sure you are not. -- nosy: +prakashdanish ___ Python tracker ___

[issue34334] QueueHandler logs exc_info twice

2018-08-25 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34334] QueueHandler logs exc_info twice

2018-08-04 Thread Adrian Dries
New submission from Adrian Dries : Since Python 3.7 logging.handlers.QueueHandler logs tracebacks twice:: >>> import logging >>> from logging.handlers import QueueHandler, QueueListener >>> from queue import Queue >>> q = Queue() >>> logging.getLogger().addHandler(QueueHandler(q)) >>>