Skip to content

Commit 72857c2

Browse files
committed
ssh: enhance event processing in ssh_test_lib
1 parent 7ba2661 commit 72857c2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/ssh/test/ssh_test_lib.erl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,21 @@ process_event(#{msg := {report,
14431443
io_lib:format("[~44s] ~6s ~30s ~150s~n",
14441444
[io_lib:format("~p", [E]) ||
14451445
E <- [Pid, Level, Label]] ++ [io_lib:format(Format, Args)]);
1446+
process_event(#{msg := {Format, Args},
1447+
meta := #{pid := Pid},
1448+
level := Level}) when is_list(Format), is_list(Args)->
1449+
io_lib:format("[~44s] ~6s~n~s~n",
1450+
[io_lib:format("~p", [E]) ||
1451+
E <- [Pid, Level]] ++ [io_lib:format(Format, Args)]);
1452+
process_event(#{msg := {report,
1453+
#{label := Label,
1454+
reason := Reason,
1455+
process_label := ProcessLabel}},
1456+
meta := #{pid := Pid},
1457+
level := Level}) ->
1458+
io_lib:format("[~44s] ~6s ~30s ~30s~n~s~n",
1459+
[io_lib:format("~p", [E]) ||
1460+
E <- [Pid, Level, Label, ProcessLabel, Reason]]);
14461461
process_event(E) ->
14471462
io_lib:format("~n||RAW event||~n~p~n", [E]).
14481463

0 commit comments

Comments
 (0)