Shoonya-Dev / ShoonyaApi-py

139 stars 130 forks source link

How to disable DEBUG: messages in the console when the program is running? #115

Closed sreenathrds closed 1 year ago

sreenathrds commented 1 year ago

The messages are too annoying and causing the delay in execution. The message look as below. DEBUG:NorenRestApiPy.NorenApi:https://api.shoonya.com/NorenWClientTP//GetQuotes DEBUG:NorenRestApiPy.NorenApi:jData={"uid": "FXXXXXXX", "exch": "NFO", "token": "57128"}&jKey=9e5f44828c147axxxxxxxxxxxacc9d9f5f1e558f0ab05cf1a229fe6b6bfdd4b51 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.shoonya.com:443 DEBUG:urllib3.connectionpool:https://api.shoonya.com:443 "POST /NorenWClientTP//GetQuotes HTTP/1.1" 200 902

sreenathrds commented 1 year ago

The below 2 lines while importing helped me to avaid these messages. Hope this may help anyone of you.

import logging
logging.basicConfig(level=None)

Since I found the answer, I am closing this issue.