You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Fusion artists it's a bit confusing because the Console tab gets a red warning icon whenever any text is written through sys.stderr and thus it appears that even when just debug launching messages are printed as if things are going wrong.
Would it make sense to override this behavior for logging in Fusion for OpenPype. Preferably even beforeopenpype.install() so that all messages are captured the right way. If so, where would I do that? Could an env variable be a solution to this.
Visually for Fusion the best bet would be to actually write to sys.stdout when info or debug level and write to sys.stderr when warning or higher. However, I'm not sure if that makes any sense in logging world.
To Reproduce
Steps to reproduce the behavior:
Start any tool in Fusion
Note how any logged message from the OpenPype logger logs as red error text
This may be already much less problematic since recent changes where the Publisher UI does not print into the host integration's console: ynput/ayon-core#877
Describe the bug
When OpenPype logs messages through its default logger from
openpype.lib.log.PypeLogger
it writes tosys.stderr
due to theopenpype.lib.log.PypeStreamHandler
inheriting fromlogging.StreamHandler
which defaults to writing tosys.stderr
when no stream is provided.For Fusion artists it's a bit confusing because the Console tab gets a red warning icon whenever any text is written through
sys.stderr
and thus it appears that even when just debug launching messages are printed as if things are going wrong.Would it make sense to override this behavior for logging in Fusion for OpenPype. Preferably even before
openpype.install()
so that all messages are captured the right way. If so, where would I do that? Could an env variable be a solution to this.Visually for Fusion the best bet would be to actually write to
sys.stdout
when info or debug level and write tosys.stderr
when warning or higher. However, I'm not sure if that makes any sense inlogging
world.To Reproduce
Steps to reproduce the behavior:
Additional context
Also reported on discord here.
There already is some logic in the Fusion integration to solve some of the logging coloring issues but they date from before OpenPype and thus the OpenPype logger. Also the solution in that install logic might not be the best approach either. So would love to have some input on how to best approach something like this.
[cuID:OP-6742]
The text was updated successfully, but these errors were encountered: