This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sejvlond
Recipients sejvlond
Date 2015-10-29.10:22:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446114122.71.0.187409652652.issue25508@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

in doc https://docs.python.org/3.4/library/logging.html#logrecord-attributes there is
args 	You shouldn’t need to format this yourself. 	The tuple of arguments merged into msg to produce message.

But when I log message with 1 arg - a dict - in record.args will be this dict

```
import logging

class H(logging.Handler):
    def emit(self, record):
        print(record.args, type(record.args))

lgr = logging.getLogger()
lgr.addHandler(H())
lgr.error("msg", 1)
lgr.error("msg", dict(a=1))
lgr.error("msg", dict(a=1), 2)
```
output:
```
(1,) <class 'tuple'>
{'a': 1} <class 'dict'>
({'a': 1}, 2) <class 'tuple'>
```
History
Date User Action Args
2015-10-29 10:22:02sejvlondsetrecipients: + sejvlond
2015-10-29 10:22:02sejvlondsetmessageid: <1446114122.71.0.187409652652.issue25508@psf.upfronthosting.co.za>
2015-10-29 10:22:02sejvlondlinkissue25508 messages
2015-10-29 10:22:02sejvlondcreate