pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
127 stars 59 forks source link

Verbose output from publish #304

Closed tokejepsen closed 7 years ago

tokejepsen commented 8 years ago

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).

mottosso commented 8 years ago

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:

tokejepsen commented 7 years ago

Is this a duplicate issue of https://github.com/pyblish/pyblish-base/issues/299 ?

mottosso commented 7 years ago

Is this a duplicate issue of #299 ?

Yes, I do think so.