This function is used to turn the capture of warnings by logging on and off.
logging.captureWarnings(capture)