logging.log()

logging.log(level, msg, *args, **kwargs)

Logs a message with level level on the root logger. The other arguments are interpreted as for debug().

Note

The above module-level convenience functions, which delegate to the root logger, call basicConfig() to ensure that at least one handler is available. Because of this, they should not be used in threads, in versions of Python earlier than 2.7.1 and 3.2, unless at least one handler has been added to the root logger before the threads are started. In earlier versions of Python, due to a thread safety shortcoming in basicConfig(), this can (under rare circumstances) lead to handlers being added multiple times to the root logger, which can in turn lead to multiple messages for the same event.

doc_python
2016-10-07 17:36:19
Comments
Leave a Comment

Please login to continue.