zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
1.01k stars 477 forks source link

Kiteconnect should not attach log handlers and level #22

Closed joeirimpan closed 6 years ago

joeirimpan commented 6 years ago

logging.basicConfig attaches a streamhandler by default. This will in turn mask any logger in the application end (werkzeug in my case).

Attaching log handler for kiteconnect should instead happen on application end

import logging
kite_logger = logging.getLogger('kiteconnect')
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
kite_logger.addHandler(handler)

# Now run the application in debug mode
joeirimpan commented 6 years ago

https://github.com/rainmattertech/pykiteconnect/pull/23