splunk_handler and logbook

2015-02-26 Thread jvarghese

Hi,
I am tring to use splunk(splunk_handler), my question is  "Is there any way 
to integrate logbook with splunk_handler".


The examples of splunk_handler uses python's logging module.

Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: splunk_handler and logbook

2015-02-26 Thread jvarghese
I got the solution,
 Use RedirectLoggingHandler, to redirect the logs to logbook,

 from logging import getLogger
 mylog = getLogger('My Log')
from splunk_handler import SplunkHandler

splunk = SplunkHandler(
... host='',
... port='',
... username='',
... password='',
... index='',
... verify=,
... source=""
... )
from logbook.compat import RedirectLoggingHandler
mylog.addHandler(RedirectLoggingHandler())
mylog.addHandler(splunk)

..
-- 
https://mail.python.org/mailman/listinfo/python-list