Logging
Logging
Pyblish does not produce any output unless you explicitly tell it to.
If you enable the DEBUG
level whilst developing plug-ins, Pyblish can tell you a few things about what is going on.
The handler can be customised to tailor the format and contents of the messages, like a timestamp and what not.
Read up on standard Python logging and corresponding handlers for more details.
Formatting
In the above example, messages weren't very pretty. You can control the formatting of messages like this.
That %(message)s
is one of the many variables available during formatting, see here for a full list.
Gotchas
basicConfig
will register a handler too, and it's possible to have many. Seelog.handlers
for the ones currently registered, it's a plain Pythonlist
that you can clear to get rid of them.Autodesk Maya is special, it runs the equivalent of
basicConfig
under-the-hood at startup. Which means that you always see these messages whether you want to or not. You can remove handlers, and edit them despite this.Standalone Python doesn't have any handlers registered, and needs something like the above.
See or start a conversation about this on the forums
Last updated