instrumentserver.log#
instrumentserver.log : Logging tools and defaults for instrumentserver.
Functions
|
Simple wrapper to log messages. |
|
Get the (root) logger for the package. |
|
Setting up logging, including adding a custom handler. |
Classes
|
|
|
A simple logger widget. |
|
A simple log handler that supports logging in TextEdit |
- class instrumentserver.log.LogLevels(*values)[source]#
Bases:
Enum- debug = 4#
- error = 1#
- info = 3#
- warn = 2#
- class instrumentserver.log.LogWidget(parent: QWidget | None = None, level: int = 20)[source]#
Bases:
QWidgetA simple logger widget. Uses QLogHandler as handler. The handler has the actual widget that is used to display the logs.
- class instrumentserver.log.QLogHandler(parent: QWidget | None)[source]#
Bases:
QObject,HandlerA simple log handler that supports logging in TextEdit
- COLORS = {10: <PyQt5.QtGui.QColor object>, 20: <PyQt5.QtGui.QColor object>, 30: <PyQt5.QtGui.QColor object>, 40: <PyQt5.QtGui.QColor object>}#
- instrumentserver.log.log(logger: Logger, message: str, level: LogLevels) None[source]#
Simple wrapper to log messages.
Useful when the log level is a variable.