def unwatch_log():
 log_root = logging.getLogger(None).logger
 to_replace = [h for h in log_root.handlers if isinstance(h, handlers.WatchedFileHandler)]
 for handler in to_replace:
  new_handler = std_logging.FileHandler(handler.baseFilename, mode=handler.mode, encoding=handler.encoding)
  log_root.removeHandler(handler)
  log_root.addHandler(new_handler)

def unwatch_log ( ) : log_root = logging . getLogger ( None ) . logger to_replace = [ h for h in log_root . handlers if isinstance ( h , handlers . WatchedFileHandler ) ] for handler in to_replace : new_handler = std_logging . FileHandler ( handler . baseFilename , mode = handler . mode , encoding = handler . encoding ) log_root . removeHandler ( handler ) log_root . addHandler ( new_handler )
replace watchedfilehandler handlers by filehandler ones .