splunk/splunk-sdk-python — pull request #94 by zach-taylor (2014-11-09 23:35:00+00:00)
Title: Change splunklib logging

I have made a couple changes to the debug logging found within the splunklib module.

Before the debug logging was going to the Python root logger, which causes recursion if I'm using the Splunk SDK to send Python debug level logs to Splunk. The splunklib module should log to its own module rather than the Python root logger. In addition I added a NullHandler to the splunklib module so its logs are, by default, not forwarded to the root logger.

If one needs to view the splunklib module's debug logs, they can do something like this:

import logging
splunklib_logger = logging.getLogger('splunklib')
splunklib_logger.addHandler(logging.FileHandler('debug.log'))

Let me know if I missed anything here, and if something needs to be changed.
Thanks!