mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #1512 from pypeclub/feature/convert_pyblish_logs_to_string
Convert pyblish logs to string at the moment of logging
This commit is contained in:
commit
f87b580ad6
1 changed files with 9 additions and 0 deletions
|
|
@ -67,6 +67,15 @@ def patched_discover(superclass):
|
|||
@import_wrapper
|
||||
def install():
|
||||
"""Install Pype to Avalon."""
|
||||
from pyblish.lib import MessageHandler
|
||||
|
||||
def modified_emit(obj, record):
|
||||
"""Method replacing `emit` in Pyblish's MessageHandler."""
|
||||
record.msg = record.getMessage()
|
||||
obj.records.append(record)
|
||||
|
||||
MessageHandler.emit = modified_emit
|
||||
|
||||
log.info("Registering global plug-ins..")
|
||||
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||
pyblish.register_discovery_filter(filter_pyblish_plugins)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue