Qt Custom UI Log for Maya/Houdini
Project description
QtLog
Custom Python Log with colored message display for Maya/Houdini/Nuke
PySide2/Python3 - Maya +2022, Houdini +19, Nuke +13
PySide6/Python3 - Maya +2025
Message Levels
log = get_stream_logger('my_log')
log.info('test info') # white
log.warning('test warning') # orange
log.error('test error') # red
log.critical('test critical') # purple
log.debug('test debug') # yellow
log.ok('test ok') # sky blue
log.file('test file') # super light blue
log.process('test process') # light blue
log.done('test done') # green
log.hint('hint to the user') # yellow
Usage
# imports
from qtlog.stream_log import get_stream_logger
from qtlog.qt_ui_logger import QtUILogger
# get loggers
log = get_stream_logger('MyToolLog')
log_ext = get_stream_logger('ExternalLog')
# inside your qt app, you need a qtLayout to place the logger output widget.
class MyTool(QMainWindow):
def __init__(self, parent=get_maya_main_window()):
...
# creating/storing loggers (self, QtLayout, loggers)
self.loggers = QtUILogger(parent=self, layout_widget=self.ui.log_layout, loggers=[log, log_ext])
self.ui.btn_ok.clicked.connect(self.show_messages)
def closeEvent(self, event):
# remove the widget from the loggers, call .close() on closeEvent()
self.loggers.close()
self.close()
# sent messages are displayed in color on the ui widget and maya
log.hint('Message')
Install
pip install qt-log
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qt_log-1.1.1.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qt_log-1.1.1.tar.gz.
File metadata
- Download URL: qt_log-1.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9066c8ba715178ca6cd0569cda0c49449e86e76b36f040499404f510d35f2d99
|
|
| MD5 |
600353b5675bead49fe0e24700ab757d
|
|
| BLAKE2b-256 |
853e91ad87d164c91954a5ec2edbc682dde3aab771b6d7237cd4fde76c520f69
|
File details
Details for the file qt_log-1.1.1-py3-none-any.whl.
File metadata
- Download URL: qt_log-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5878beae5a4ee94f648a9f0663de2e9b3860b527c78259df18689e996fbba3d9
|
|
| MD5 |
152cb7b026e7330895e08386c93cb083
|
|
| BLAKE2b-256 |
5fd4e62669b2c7f52fbab53bf4faa00de0657531d10221553883075e8f0a9d7f
|