diff --git a/lib/mqtt_client.dart b/lib/mqtt_client.dart index 02d7c8a..673ec4a 100644 --- a/lib/mqtt_client.dart +++ b/lib/mqtt_client.dart @@ -338,7 +338,9 @@ class MqttClient { _resetTimer(); } - print("[mqttClient] [" + m._topic + "][" + m._payload + "]"); + if (debugMessage) { + print("[mqttClient] [" + m._topic + "][" + m._payload + "]"); + } // notify the client of the new topic / payload if (_onSubscribeDataMap != null && _onSubscribeDataMap[m._topic] != null) _onSubscribeDataMap[m._topic](m._topic, m._payload);