Issue 1197: logging: formatter does not accept %(funcName)s properly
Issue1197
Created on 2007-09-24 14:20 by CM, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg56111 - (view) | Author: Christian Meesters (CM) | Date: 2007-09-24 14:27 | |
Adding %(funcName)s to a formatter will only insert the calling logging
function (e.g. "info" for logging.info) into messages not the function
where the message comes from:
<snip>
logging.Formatter('%(levelname)-8s %(funcName)s %(message)s'
def foo():
logging.info("test")
will insert
'INFO info test'
in the log instead of
'INFO foo test'
|
|||
| msg56141 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2007-09-25 22:42 | |
This is not a logging bug, but related to #1180193. See http://bugs.python.org/issue1180193 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:27 | admin | set | github: 45538 |
| 2007-09-25 22:42:34 | vinay.sajip | set | status: open -> closed assignee: vinay.sajip resolution: duplicate messages: + msg56141 nosy: + vinay.sajip |
| 2007-09-24 17:18:10 | jafo | set | priority: normal |
| 2007-09-24 14:27:30 | CM | set | nosy:
+ CM messages: + msg56111 |
| 2007-09-24 14:20:12 | CM | create | |
