fix print subscription

This commit is contained in:
Feng 2016-10-18 11:02:30 +08:00
parent 5461cc357a
commit c41f2c97f3
1 changed files with 4 additions and 4 deletions

View File

@ -530,10 +530,10 @@ print({ClientId, _ClientPid, CleanSess, SessInfo}) ->
"created_at=~w)~n",
[ClientId, CleanSess | [format(Key, get_value(Key, SessInfo)) || Key <- InfoKeys]]).
print(subscription, {Sub, Topic, Opts}) when is_pid(Sub) ->
?PRINT("~p -> ~s: ~p~n", [Sub, Topic, Opts]);
print(subscription, {Sub, Topic, Opts}) ->
?PRINT("~s -> ~s: ~p~n", [Sub, Topic, Opts]).
print(subscription, {Sub, Topic}) when is_pid(Sub) ->
?PRINT("~p -> ~s~n", [Sub, Topic]);
print(subscription, {Sub, Topic}) ->
?PRINT("~s -> ~s~n", [Sub, Topic]).
format(created_at, Val) ->
emqttd_time:now_to_secs(Val);