MqttMonitor/MqttClient.py

changeset 43
a0853f7a8b80
parent 31
40582e448c4b
child 51
b865211461c7
--- a/MqttMonitor/MqttClient.py	Mon Sep 10 16:42:15 2018 +0200
+++ b/MqttMonitor/MqttClient.py	Mon Sep 10 16:52:37 2018 +0200
@@ -51,6 +51,7 @@
     LogNotice = 0x04
     LogWarning = 0x08
     LogError = 0x10
+    LogDisabled = 0xff
     LogLevelMap = {
         mqtt.MQTT_LOG_DEBUG: LogDebug,
         mqtt.MQTT_LOG_INFO: LogInfo,
@@ -591,5 +592,8 @@
         return QCoreApplication.translate("MqttLogLevelString", "Error")
     elif logLevel == MqttClient.LogDebug:
         return QCoreApplication.translate("MqttLogLevelString", "Debug")
+    elif logLevel == MqttClient.LogDisabled:
+        return QCoreApplication.translate("MqttLogLevelString",
+                                          "Logging Disabled")
     else:
         return QCoreApplication.translate("MqttLogLevelString", "Unknown")

eric ide

mercurial