Messaging
Standardized message stream client: sends timestamped, source-tagged messages to the Message Hub.
Overview
quatm/servers/messageclient.py provides the messaging system: MessageClient is the standardized message stream client, sending messages with a timestamp and originating file to the Message Hub (PUB). Everyday code should generally not construct it directly but use the module-level send functions instead.
Send functions
| Function | Description |
|---|---|
send_info(msg) | Info level: enters the message stream as an ordinary notification |
send_warning(msg) | Warning level: enters the message stream and raises a warning notification |
send_error(msg) | Error level: enters the message stream and raises an error notification |
send_debug(msg) | Debug level: shown only on the debug channel |
Usage
from quatm.servers.messageclient import send_info, send_error
send_info("Experiment started")
send_error("Camera connection timed out")