sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Component.Setting] Introduce PrintLog component to set printLog to all the graph components

Open alxbilger opened this issue 2 years ago • 6 comments

A detailed description of the component is provided in the code Unit tests are added.


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).

alxbilger avatar Jul 22 '22 15:07 alxbilger

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

alxbilger avatar Jul 23 '22 10:07 alxbilger

I understand the feature, I understand the need and I agree I would use it.... but I find really weird to set the option using a component in the graph...

Do you know if there is an option in the Node? we could use the same logic but per Node

epernod avatar Jul 24 '22 21:07 epernod

One component to rule them all, One component to find them, One component to bring them all, and in the printLog to flood the messaging system!

interesting remark @epernod : but could we be willing to have only the messages of the Node and not its content?

hugtalbot avatar Jul 25 '22 07:07 hugtalbot

Ok sorry my message was not totally clear. I meant, you check the option in the Node and it propagate the printLog to all child Node and their components. So if you want all the printLog, you activate it in the root Node. Just suggesting.

epernod avatar Jul 25 '22 13:07 epernod

Thanks for you feedback @epernod. I think your suggestion is the more natural. Actually, I tried to set printLog in a log, to see if it was already working (but no). But I always feel uncomfortable when modifying such an important base class. I don't want that some classes become God classes. That's why I did not touch the Node class. But I am definitively open to discussion

alxbilger avatar Jul 27 '22 11:07 alxbilger

Agreed with @epernod it would seem more natural to have the behavior from a Node even if this would mean to pollute Node.h → suggestion to close : ok @alxbilger ?

hugtalbot avatar Aug 10 '22 09:08 hugtalbot

I am ok with the suggestion

alxbilger avatar Aug 22 '22 10:08 alxbilger