Fix the subscrptions print
This commit is contained in:
parent
14d28d59bd
commit
7c90e08f57
|
@ -537,20 +537,21 @@ print({Topic, Node}) ->
|
||||||
?PRINT("~s -> ~s~n", [Topic, Node]);
|
?PRINT("~s -> ~s~n", [Topic, Node]);
|
||||||
|
|
||||||
print({ClientId, _ClientPid, _Persistent, SessInfo}) ->
|
print({ClientId, _ClientPid, _Persistent, SessInfo}) ->
|
||||||
|
Data = lists:append(SessInfo, emqttd_stats:get_session_stats(ClientId)),
|
||||||
InfoKeys = [clean_sess,
|
InfoKeys = [clean_sess,
|
||||||
|
subscriptions,
|
||||||
max_inflight,
|
max_inflight,
|
||||||
inflight_queue,
|
inflight_len,
|
||||||
message_queue,
|
mqueue_len,
|
||||||
message_dropped,
|
mqueue_dropped,
|
||||||
awaiting_rel,
|
awaiting_rel_len,
|
||||||
awaiting_ack,
|
deliver_msg,
|
||||||
awaiting_comp,
|
enqueue_msg,
|
||||||
created_at],
|
created_at],
|
||||||
?PRINT("Session(~s, clean_sess=~s, max_inflight=~w, inflight_queue=~w, "
|
?PRINT("Session(~s, clean_sess=~s, max_inflight=~w, inflight=~w, "
|
||||||
"message_queue=~w, message_dropped=~w, "
|
"mqueue_len=~w, mqueue_dropped=~w, awaiting_rel=~w, "
|
||||||
"awaiting_rel=~w, awaiting_ack=~w, awaiting_comp=~w, "
|
"deliver_msg=~w, enqueue_msg=~w, created_at=~w)~n",
|
||||||
"created_at=~w)~n",
|
[ClientId | [format(Key, get_value(Key, Data)) || Key <- InfoKeys]]).
|
||||||
[ClientId | [format(Key, get_value(Key, SessInfo)) || Key <- InfoKeys]]).
|
|
||||||
|
|
||||||
print(subscription, {Sub, Topic}) when is_pid(Sub) ->
|
print(subscription, {Sub, Topic}) when is_pid(Sub) ->
|
||||||
?PRINT("~p -> ~s~n", [Sub, Topic]);
|
?PRINT("~p -> ~s~n", [Sub, Topic]);
|
||||||
|
|
Loading…
Reference in New Issue