-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish: Allow to disable printing logs to host #740
Comments
It would be great if we could set logging level for Pyblish plugins. |
Just wanted to chime in that this is very relevant for Substance Painter too. I had a case where a single As an example: class ExampleFast(pyblish.api.InstancePlugin):
order = pyblish.api.CollectorOrder + 0.4
def process(self, instance):
return
class ExampleSlow(pyblish.api.InstancePlugin):
order = pyblish.api.CollectorOrder + 0.4
def process(self, instance):
self.log.info("TEST") The fast example here would run over 30 instances pretty much instantly, the second would then take about 0.2seconds per instance if Substance Painter has a lot of previous logs still in its logs (even if the log view is disabled). |
Also wanted to link this PR #817 to additionally explain how much impact logging can have on performance. Note however that if printing to the host UI isn't done it still wouldn't remove the full issue of actually still formatting and logging massive data sets as described in that issue, but it'll definitely help in some DCCs. |
This issue coming from OpenPype is still relevant to AYON since I've still noticed slowness on the printing of logs to the host - so I transferred the issue. |
Is your feature request related to a problem? Please describe.
I'd like to disable Pyblish (and potentially even OpenPype Logger logs during publishing) printing its logs into the Host DCC (e.g. Maya) as a setting when running the Pyblish UI.
Describe the solution you'd like
Be able to set e.g. a
OPENPYPE_PRINT_PYBLISH_LOGS=0
or an equivalent setting to disable the printing tostderr
. The logs should still get collected and handled by the UI. I'd only like to have it not propagate its logs into the host DCC.Describe alternatives you've considered
I've tried disabling the propagating of the Pyblish loggers like this:
But that also avoids the Pyblish Pype UI to actually capture the logs. Note that the original Pyblish QML does work with propagate disabled - there the logs still get handled by the UI regardless.
Additional context
Printing in the Maya script editor has always been relatively slow - and during publishing there's relatively quite a high amount of logging/printing being done. I'd like to try and avoid the clutter in the Script Editor and at the same time likely optimize the publishing steps too.
Especially with the new publisher UI coming up the logs are much easier to debug per instance in the UI - better than the printed logs into the host DCC would allow for debugging.
First mentioned on OpenPype discord here
Of course would also love to know if this is a bad idea to begin with. :)
[cuID:OP-3914]
The text was updated successfully, but these errors were encountered: