So, im trying to reduce the amount of debbug logging because its really bothering me. Im working with ib_insync, but im actually a tester, im pretty new to python. So, ive entered the util file, and change the logToConsole function but it didnt work. This how it looks like now:
` def logToConsole(level=logging.ERROR):
"""Create a log handler that logs to the console."""
logger = logging.getLogger()
stdHandlers = [
h for h in logger.handlers
if type(h) is logging.StreamHandler and h.stream is sys.stderr]
if stdHandlers:
# if a standard stream handler already exists, use it and
# set the log level for the ib_insync namespace only
logging.getLogger('ib_insync').setLevel(level)
else:
# else create a new handler
logger.setLevel(level)
formatter = logging.Formatter(
'%(asctime)s %(name)s %(levelname)s %(message)s')
handler = logging.StreamHandler()
handler.setFormatter(formatter)
logger.addHandler(handler)`
and this are the kind of messages im trying to avoid (i dont even know where they come from)
DEBUG: <<< 6,2,StockMarketValue,0.00,EUR,DU5856680