Send all VTK error/warning messages to Python's logging module

def send_errors_to_logging():
    """Send all VTK error/warning messages to Python's logging module"""
    error_output = vtk.vtkStringOutputWindow()
    error_win = vtk.vtkOutputWindow()
    error_win.SetInstance(error_output)
    obs = Observer()
    return obs.observe(error_output)