Skip to content

Commit 594e1d4

Browse files
author
bzhangxmt
committed
Fix Bug 444968 - Trace logs for Paho SUBSCRIBE show the topic, but the QoS is hard to identify in there
Add qos=qos_value to the log Bug: 444968 Signed-off-by: bzhangxmt <zhbinbj@cn.ibm.com>
1 parent 76b7891 commit 594e1d4

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttAsyncClient.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,12 @@ public IMqttToken subscribe(String[] topicFilters, int[] qos, Object userContext
703703
if (i>0) {
704704
subs+=", ";
705705
}
706-
subs+=topicFilters[i]+":"+qos[i];
706+
subs+= "topic="+ topicFilters[i]+" qos="+qos[i];
707707

708708
//Check if the topic filter is valid before subscribing
709709
MqttTopic.validate(topicFilters[i], true/*allow wildcards*/);
710710
}
711-
712-
//@TRACE 106=Subscribe topic={0} userContext={1} callback={2}
711+
//@TRACE 106=Subscribe topicFilter={0} userContext={1} callback={2}
713712
log.fine(CLASS_NAME,methodName,"106",new Object[]{subs, userContext, callback});
714713

715714
MqttToken token = new MqttToken(getClientId());

org.eclipse.paho.client.mqttv3/src/main/resources/org/eclipse/paho/client/mqttv3/internal/nls/logcat.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
104=> quiesceTimeout={0} userContext={1} callback={2}
130130
105=< exception
131131
108=<
132-
106=Subscribe topic={0} userContext={1} callback={2}
132+
106=Subscribe topicFilter={0} userContext={1} callback={2}
133133
109=<
134134
107=Unsubscribe topic={0} userContext={1} callback={2}
135135
110=<

0 commit comments

Comments
 (0)