It looks like you're new here. If you want to get involved, click one of these buttons!
p = subprocess.Popen(cmd, stdin = sub.DEVNULL, stdout = f, \
stderr = f, cwd = os.getcwd(), startupinfo = si)
And since then, Kite Connect library logs are showing up in my logs! (examples below) This is probably due to stdout
and stderr
assignments above, but removing them has not helped. How do I disable such logs from appearing in my logs?
2024-01-29 09:09:50+0530 [-] Starting factory <kiteconnect.ticker.KiteTickerClientFactory object at 0x000001525D8CEEF0>
2024-01-29 11:50:51+0530 [-] dropping connection to peer tcp4:15.206.6.240:443 with abort=True: None
2024-01-29 11:50:51+0530 [-] dropping connection to peer tcp4:43.205.183.135:443 with abort=True: None
2024-01-29 11:50:51+0530 [-] <twisted.internet.tcp.Connector instance at 0x1525d853760 disconnected IPv4Address(type='TCP', host='ws.kite.trade', port=443)> will retry in 2 seconds
2024-01-29 11:50:51+0530 [-] Stopping factory <kiteconnect.ticker.KiteTickerClientFactory object at 0x000001525D8527A0>
2024-01-29 11:50:51+0530 [-] <twisted.internet.tcp.Connector instance at 0x1525d8cee90 disconnected IPv4Address(type='TCP', host='ws.kite.trade', port=443)> will retry in 2 seconds
Also, make sure you have not enabled event logging at the program level.
debug
arg is true inKiteConnect()
. However, after I setstdout = sub.DEVNULL
in the above code snippet, twisted logs disappeared.I did not understand "event logging at the program level". How to set or unset this?
logging.basicConfig(level=logging.DEBUG)
, using the logging package.