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.
Created on 2010年02月07日 14:51 by tocomo, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg99003 - (view) | Author: Tobias (tocomo) | Date: 2010年02月07日 14:51 | |
logging.basicConfig should raise warning/eception on second call. Why? logging.basicConfig(filename="/tmp/works.log") logging.basicConfig(filename="/tmp/worksnot.log") what do you think does happen? Right - logging goes to "/tmp/worksnot.log". But does not behave that way. The secound call does nothing. Simply bad coding style, an if without an else. kind regards Tobias |
|||
| msg99014 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2010年02月07日 20:23 | |
The fact that the second call will do nothing is specifically documented: http://docs.python.org/dev/library/logging.html#logging.basicConfig "This function does nothing if the root logger already has handlers configured for it." This behaviour is by design, and not an accident caused by "bad coding style". Please check the documentation before posting issues which are not real issues. Thanks. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:57 | admin | set | github: 52122 |
| 2010年02月07日 20:23:14 | vinay.sajip | set | status: open -> closed resolution: not a bug messages: + msg99014 |
| 2010年02月07日 16:59:24 | brian.curtin | set | versions:
+ Python 3.1, - Python 2.5 nosy: + vinay.sajip priority: normal components: + Library (Lib), - 2to3 (2.x to 3.x conversion tool) stage: test needed |
| 2010年02月07日 14:51:42 | tocomo | create | |