MqttMonitor/MqttClient.py

changeset 43
a0853f7a8b80
parent 31
40582e448c4b
child 51
b865211461c7
equal deleted inserted replaced
42:3e68b5ce2b0b 43:a0853f7a8b80
49 LogDebug = 0x01 49 LogDebug = 0x01
50 LogInfo = 0x02 50 LogInfo = 0x02
51 LogNotice = 0x04 51 LogNotice = 0x04
52 LogWarning = 0x08 52 LogWarning = 0x08
53 LogError = 0x10 53 LogError = 0x10
54 LogDisabled = 0xff
54 LogLevelMap = { 55 LogLevelMap = {
55 mqtt.MQTT_LOG_DEBUG: LogDebug, 56 mqtt.MQTT_LOG_DEBUG: LogDebug,
56 mqtt.MQTT_LOG_INFO: LogInfo, 57 mqtt.MQTT_LOG_INFO: LogInfo,
57 mqtt.MQTT_LOG_NOTICE: LogNotice, 58 mqtt.MQTT_LOG_NOTICE: LogNotice,
58 mqtt.MQTT_LOG_WARNING: LogWarning, # __NO-TASK__ 59 mqtt.MQTT_LOG_WARNING: LogWarning, # __NO-TASK__
589 return QCoreApplication.translate("MqttLogLevelString", "Warning") 590 return QCoreApplication.translate("MqttLogLevelString", "Warning")
590 elif logLevel == MqttClient.LogError: 591 elif logLevel == MqttClient.LogError:
591 return QCoreApplication.translate("MqttLogLevelString", "Error") 592 return QCoreApplication.translate("MqttLogLevelString", "Error")
592 elif logLevel == MqttClient.LogDebug: 593 elif logLevel == MqttClient.LogDebug:
593 return QCoreApplication.translate("MqttLogLevelString", "Debug") 594 return QCoreApplication.translate("MqttLogLevelString", "Debug")
595 elif logLevel == MqttClient.LogDisabled:
596 return QCoreApplication.translate("MqttLogLevelString",
597 "Logging Disabled")
594 else: 598 else:
595 return QCoreApplication.translate("MqttLogLevelString", "Unknown") 599 return QCoreApplication.translate("MqttLogLevelString", "Unknown")

eric ide

mercurial