Logged In: YES
user_id=308438
This is not a bug, this is by design. See the documentation for
basicConfig() in
http://docs.python.org/lib/module-logging.html
where you will see that the module-level convenience functions
(debug(), info(), warning(), etc.) call basicConfig() automatically
if the root logger has no handlers.
The idea is, if you are using the convenience functions, you
will be using logging in a simple way - hence, basicConfig() is
called for you. If you had used the root logger directly, e.g.
after
from logging import *
by using
getLogger().warning("Bicycle Repair Man!")
rather than
warning("Bicycle Repair Man!")
then no handlers would have been added. You would not have
received the "No handlers could be found", as that is a one-off
message. In the latest revisions, if you set raiseExceptions to
0 (typically for production, not development) then that
message is suppressed completely.
|