pyblish/pyblish-base

Verbose output from publish

tokejepsen opened this issue · 3 comments

Goal

To get more verbose output from pyblish.util.publish()

Motivation

Currently using pyblish.util.publish() does not produce any print statements, and so it's left to the developer to parse the results from context.data["results"].

Suggested implementation

Would be good to by default output log messages, as this is more intuitive for a new developer and easier for existing developers.
So a suggested interface to the publish method would be to add a keyword argument, so if the verbose output is not desired, it can be turned off; pyblish.util.publish(silent=True).

Simple enough, the publish() function always runs till the end so looping through the results at the point should give you the effect you are looking for.

Example

for result in context.data["results"]:
  for record in result["records"]:
    print(record.msg)

The members of each record are these:

Is this a duplicate issue of #299 ?

Is this a duplicate issue of #299 ?

Yes, I do think so.