Closed iLLiCiTiT closed 3 years ago
Thanks, but if we merge this then the next issue coming in will be "Why is my data structures converted to string during logging?" xD
This behavior is native to Python logging and nothing unique to Pyblish, and it's quite possible others depend on this behavior already so it can unfortunately not be changed as then those uses would break.
In this case, maybe subclass the plug-in and use your subclass for your custom plug-ins, with an overridden self.log
that converts things to string?
class MyContextPlugin(ContextPlugin):
@property
def log(self):
return self._my_custom_logger
Issue
Objects passed to plugin's logger object are not converted to string in
MessageHandler
so GUI logging may not show object data at the moment of logging it.How to replicate bug
Put these in plugin logic:
Run the plugin in Pyblish UI and see UI terminal output. Should see:
Suggested solution
Convert message on all emmited records to string.