Merge pull request #74 from gomoripeti/trace_fmt_extra_msg main master upstream
authorFred Hebert <mononcqc@ferd.ca>
Sat, 15 Jun 2019 23:41:55 +0000 (19:41 -0400)
committerGitHub <noreply@github.com>
Sat, 15 Jun 2019 23:41:55 +0000 (19:41 -0400)
Support extra message in traces

src/recon_trace.erl

index cfad5194bbb6e168d5d7e2e4a036900bcbaa5a17..6cd65f2bd2c35bced596e071599a0475915932ea 100644 (file)
@@ -525,6 +525,9 @@ format(TraceMsg) ->
         %% {trace, Pid, call, {M, F, Args}}
         {call, [{M,F,Args}]} ->
             {"~p:~p~s", [M,F,format_args(Args)]};
+        %% {trace, Pid, call, {M, F, Args}, Msg}
+        {call, [{M,F,Args}, Msg]} ->
+            {"~p:~p~s ~s", [M,F,format_args(Args), format_trace_output(Msg)]};
         %% {trace, Pid, return_to, {M, F, Arity}}
         {return_to, [{M,F,Arity}]} ->
             {" '--> ~p:~p/~p", [M,F,Arity]};