classification
Title: QueueHandler not formatting messages
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: favll, vinay.sajip
Priority: normal Keywords:

Created on 2017-07-30 21:52 by favll, last changed 2018-09-24 16:56 by cheryl.sabella. This issue is now closed.

Files
File name Uploaded Description Edit
queue_handler_bug.py favll, 2017-07-30 21:52
Pull Requests
URL Status Linked Edit
PR 2954 merged favll, 2017-07-30 22:00
PR 9537 merged cheryl.sabella, 2018-09-24 16:56
Messages (2)
msg299525 - (view) Author: (favll) * Date: 2017-07-30 21:52
QueueHandler does not seem to format messages when setting a Formatter and attaching the QueueHandler to a logger. See attachement for a concise example.

According to the internal documentation of the QueueHandler's prepare method it is expected that self.format(record) will format the message and put the message into record.message. However, this is not the case and self.format(record) only returns the message. So this should be ab easy fix.
msg299626 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-08-01 18:12
New changeset adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 by Vinay Sajip (favll) in branch 'master':
bpo-31084: QueueHandler now formats messages correctly. (GH-2954)
https://github.com/python/cpython/commit/adfe3440f65dfd6cf4463db6cd02cdc78e77ce17
History
Date User Action Args
2018-09-24 16:56:40cheryl.sabellasetpull_requests: + pull_request8947
2017-08-01 18:18:30vinay.sajipsetstatus: open -> closed
resolution: fixed
stage: resolved
2017-08-01 18:12:29vinay.sajipsetmessages: + msg299626
2017-08-01 07:48:46pitrousetnosy: + vinay.sajip
2017-07-30 22:00:36favllsetpull_requests: + pull_request3001
2017-07-30 21:52:10favllcreate