Can't turn off or capture INFO messages from vtkCutter in Python

Hi all,

I’m using a vtkCutter in Python to cut polydata with a plane and getting INFO output everytime I update the cutter. For example:

e[0me[2m2024-07-14 16:29:49.498 (   1.109s) [          722103]vtkPolyDataPlaneCutter.:589   INFO| e[0mExecuting vtkPolyData plane cuttere

I have tried to turn this off using vtk.vtkObject.GlobalWarningDisplayOff() or adding an observer to the cutter instance, but because it is INFO and not WARNING or ERROR, it appears that I can’t.

This appears to be unusual behaviour, and it doesn’t happen to any other vtk objects. Is this a bug? Or can I turn it off somehow?

vtk version is 9.3.1 running on MacOS 14.5

Cheers,
Michael

This was an accidental usage of INFO when TRACE was intended. It has been removed in https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11260.

You can disable it by setting the verbosity with vtkLogger::SetStderrVerbosity() somewhere early in your application. Try setting it to vtkLogger::VERBOSITY_WARNING to turn off INFO messages.

Great, thanks for the answer

Hey Cory,

I just tested 9.4.0rc2 and i’m getting INFO messages related to vtkExtractEdges:
2024-10-24 21:38:54.586 ( 13.364s) [ 18B3117] vtkExtractEdges.cxx:329 INFO| Executing edge extractor with original point numbering
2024-10-24 21:38:54.599 ( 13.377s) [ 18B3117] vtkExtractEdges.cxx:392 INFO| Created 132380 edges

Could this be related to INFO / TRACE again?

Yep. Those should be changed to TRACE as well.

Fix is here: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11591