Issue 1709: logging: log actual function name (original) (raw)
Issue1709
Created on 2007-12-30 14:31 by umaxx, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg59042 - (view) | Author: (umaxx) | Date: 2007-12-30 14:31 |
logging does not have a (formatter) option for logging the actual function name Logger class detects function name with findCaller() - *but* does not pass it to the makeRecord()-call in _log() - why? would be nice to see this feature implemented, no patch for now :( | ||
msg59090 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2008-01-02 06:44 |
This must be some kind of SVN issue. Works fine on 2.5.1: Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> def myLoggingFunc(): ... logging.warning("Be warned!") ... >>> logging.basicConfig(format="%(funcName)s %(message)s") >>> myLoggingFunc() myLoggingFunc Be warned! >>> | ||
msg59091 - (view) | Author: (umaxx) | Date: 2008-01-02 09:34 |
oops... i looked at python 2.4, not the latest trunk. my fault :( please close this issue. sorry for the noise... |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:29 | admin | set | github: 46050 |
2008-01-02 12:45:21 | vinay.sajip | set | status: pending -> closed |
2008-01-02 09:34:52 | umaxx | set | messages: + |
2008-01-02 06:44:30 | vinay.sajip | set | status: open -> pendingresolution: not a bugmessages: + |
2008-01-02 03:03:48 | gvanrossum | set | priority: lowassignee: vinay.sajipnosy: + vinay.sajip |
2007-12-30 14:31:23 | umaxx | create |