Gonzalo Matheu
Gonzalo Matheu

Reputation: 10084

Is it possible to silent native VTK logs when using python wrapper and/or pyvista?

Currently, we are using Python's vtk wrapper and also Pyvista (a more pythonist vtk wrapper).

At some parts of the process we have some log lines from .cxx files:

2022-03-17 17:21:56.031 ( 156.058s) [        4CC78740]      vtkDelaunay3D.cxx:518   WARN| vtkDelaunay3D (0x559d2b180400): 1 degenerate triangles encountered, mesh quality suspect
2022-03-17 17:21:58.045 ( 158.072s) [        4CC78740]            vtkMath.cxx:522   WARN| Unable to factor linear system
2022-03-17 17:21:58.288 ( 158.314s) [        4CC78740]      vtkDelaunay3D.cxx:518   WARN| vtkDelaunay3D (0x559d0877c080): 3 degenerate triangles encountered, mesh quality suspect

Is it possible to suppress or to manage those logs from python logging module?

Upvotes: 3

Views: 702

Answers (1)

Nico Vuaille
Nico Vuaille

Reputation: 2498

you have the vtkLogger class to manage your logs (I know, c++ docs but VTK has a lack of python doc).

e.g.:

vtk.vtkLogger.SetStderrVerbosity(vtk.vtkLogger.VERBOSITY_OFF)

Upvotes: 6

Related Questions