Skip to content

[runSofa] Main: add an option "quiet" , ignoring info messages at start-up - #6295

Open
fredroy wants to merge 2 commits into
sofa-framework:masterfrom
fredroy:runsofa_quiet
Open

[runSofa] Main: add an option "quiet" , ignoring info messages at start-up#6295
fredroy wants to merge 2 commits into
sofa-framework:masterfrom
fredroy:runsofa_quiet

Conversation

@fredroy

@fredroy fredroy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

IMO I think runSofa can be really too verbose, especially with the number of loaded plugins.

So this PR is a proposal to add a quiet flag, which ignores the [INFO] message coming from somewhere else than the Simulation itself, aka loadplugins, paths, ini config... It will still print the other types of messages (warning, deprecation, advise, error....)
It was already implemented on the Simulation side, with the "printLog=false" but this mechanism is only implemented in the PerComponentLoggingMessageHandler class.

I needed to modify the MessageHandler base class to add the filter for all the handlers. Note that even PerComponentLoggingMessageHandler do its job (i.e printing INFO message when true) even if the flag "quiet" is set, because runSofa restores the default behavior before the init() stage.

Did some small refactoring in runSofa about the instanciations of the handlers too (would need to use shared_ptr one day, but not the purpose of the PR)

Example of output with the default scene, no other option:

without the flag (102 lines)
./bin/runSofa /linuxdata/sofa/src/master/examples/Demos/fallingSOFA.scn
[INFO]    [runSofa] PluginRepository paths = /linuxdata/sofa/build/master/Release/lib:/linuxdata/sofa/build/master/Release/plugins
[INFO]    [runSofa] DataRepository paths = /linuxdata/sofa/src/master/share:/linuxdata/sofa/src/master/examples:/linuxdata/sofa/build/master/Release:/linuxdata/sofa/build/master/Release:/linuxdata/sofa/build/master/Release
[INFO]    [runSofa] runSofaDataRepository paths = /linuxdata/sofa/src/master/applications/projects/runSofa/resources:/linuxdata/sofa/build/master/Release
[INFO]    [GUIManager] Registered batch as a GUI.
[INFO]    [runSofa] Loading automatically plugin list in /linuxdata/sofa/build/master/Release/lib/plugin_list.conf.default
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.ODESolver.Forward.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.ODESolver.Backward.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.ODESolver.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.IO.Mesh.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.IO.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Playback.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SceneUtility.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Container.Constant.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Container.Dynamic.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Container.Grid.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Container.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Mapping.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.Utility.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Topology.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Visual.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSystem.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSolver.Iterative.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSolver.Ordering.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSolver.Direct.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSolver.Preconditioner.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.LinearSolver.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Mass.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Diffusion.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Mapping.Linear.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Mapping.NonLinear.so
[DEPRECATED] [Sofa.Component.Mapping.MappedMatrix] This plugin is deprecated and will be removed in the future.
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Mapping.MappedMatrix.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Mapping.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.StateContainer.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.Spring.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.FEM.Elastic.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.FEM.HyperElastic.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.FEM.NonUniform.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.FEM.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.TensorMass.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.SolidMechanics.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.Lagrangian.Model.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.Lagrangian.Correction.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.Lagrangian.Solver.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.Lagrangian.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.Projective.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Constraint.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.AnimationLoop.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.MechanicalLoad.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Geometry.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Detection.Algorithm.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Detection.Intersection.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Detection.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Response.Mapper.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Response.Contact.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.Response.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Collision.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Setting.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Controller.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Engine.Analyze.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Engine.Generate.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Engine.Select.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Engine.Transform.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Engine.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.Haptics.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.Component.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GL.Component.Rendering2D.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GL.Component.Rendering3D.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GL.Component.Engine.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GL.Component.Shader.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GL.Component.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GUI.Component.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofa.GUI.Batch.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSceneCreator.so
[INFO]    [SofaCUDA] C++ standard = 202002
[INFO]    [SofaCUDA] === CUDA Version Diagnostics ===
[INFO]    [SofaCUDA] Driver  version : 13.2
[INFO]    [SofaCUDA] Runtime version : 13.1
[INFO]    [SofaCUDA] [OK] Driver is compatible with runtime.
[INFO]    [SofaCUDA] CUDA: 1 device(s) found.
[INFO]    [SofaCUDA] CUDA:  0 : "NVIDIA GeForce RTX 4080", 15670/15942 MB, 608 cores, revision 8.9
[INFO]    [SofaCUDA] CUDA: Using device 0 : "NVIDIA GeForce RTX 4080"
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofaCUDA.Core.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofaCUDA.Component.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofaCUDA.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libMultiThreading.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofaCarving.so
[INFO]    [PluginManager] Loaded plugin: /linuxdata/sofa/build/master/Release/lib/libSofaCHOLMOD.so
[INFO]    [PluginManager] 74 plugins have been loaded from /linuxdata/sofa/build/master/Release/lib/plugin_list.conf.default
[WARNING] [GUIManager] Previously used GUI not registered. Using default GUI.
[INFO]    [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionPipelineAndModels, SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckEmptyNodeName, SceneCheckMapping, SceneCheckMissingRequiredPlugin, SceneCheckSpecialCharacters, SceneCheckUsingAlias, SceneCheckMultithreading]
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:   
	TetrahedronFEMForceField[Vec3d] -> ParallelTetrahedronFEMForceField[Vec3d]  

[INFO] [SceneCheckerVisitor] Finished validating node "root".
[INFO] [BatchGUI] Computing 1000 iterations.

[INFO] [BatchGUI] Processing.

[INFO] [BatchGUI] 1000 iterations done in 2.57177 s ( 388.838 FPS).

[INFO] [BatchGUI] 1000 iterations done in 2.57177 s ( 388.838 FPS).

with the flag (12 lines)
/bin/runSofa /linuxdata/sofa/src/master/examples/Demos/fallingSOFA.scn -q
[DEPRECATED] [Sofa.Component.Mapping.MappedMatrix] This plugin is deprecated and will be removed in the future.
[WARNING] [GUIManager] Previously used GUI not registered. Using default GUI.
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:   
	TetrahedronFEMForceField[Vec3d] -> ParallelTetrahedronFEMForceField[Vec3d]  

[INFO] [BatchGUI] Computing 1000 iterations.

[INFO] [BatchGUI] Processing.

[INFO] [BatchGUI] 1000 iterations done in 2.62081 s ( 381.562 FPS).

[INFO] [BatchGUI] 1000 iterations done in 2.62081 s ( 381.562 FPS).

Breaking because this is changing the API of MessageHandler

[with-all-tests]

[ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/637]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Sep 7, 2026
@fredroy fredroy added the pr: breaking Change possibly inducing a compilation error label Sep 7, 2026
@fredroy

fredroy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

[ci-build][with-all-tests]

@sofabot

sofabot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

[ci-depends-on] detected during build #2.

To unlock the merge button, you must

@sofabot

sofabot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

[ci-depends-on] detected during build #3.

To unlock the merge button, you must

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: breaking Change possibly inducing a compilation error pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants