简体   繁体   中英

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?

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

eg:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM