Open davidlatwe opened 5 years ago
Could this also allow to expand and see the full log history in something like Maya's script editor? So we create our own window to show that.
Yeah, if we also pipe logs into a log file, or just keeping them in memory, could do !
Very nice. Could be a good starting point for shared widgets.
avalon\tools\widgets.py
Could this also allow to expand and see the full log history in something like Maya's script editor?
About full log history, which one would be better for this ? A tree view widget like the one in pyblish-qml or lite that you could filter out logs by level and even sorting them, or just plain text like Maya script editor ?
Problem
I found that Avalon's GUI tools use a common widget function called
echo
to prompt status messages, some of them were able to show on widget, some of them were print out only. I think this could be improved.Propose
Use
logging
to pipe status logs into a custom status line widget.By connecting Logger, we could prompt log message from anywhere to not only console but also GUI.
Full code for demo
NOTE: The implementation above, will not show messages in status line if log level is lower then previous message that was higher then
logging.WARNING
.