The Python's pprint function I use for logging dictionaries is quite slow for larger objects. I cannot find a way to completely turn off the processing of that function using the standard logging library. Run the code below as an example:
logging.disable(50)
logging.log(msg=sum(range(20000000)), level=0)
Even though the result did not show up, the sum was still definitely computed (crank up the number inside of range to see what I mean). Is there a standard way in the logging module to disable the computing completely? If not, other suggestions are also welcomed.