diff options
author | Raimo Niskanen <[email protected]> | 2018-10-25 14:56:36 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-11-16 14:40:44 +0100 |
commit | 6c17eb4036eaa9afba86929821b6ec81a91c2787 (patch) | |
tree | a977aa62fd1ce6f1091c64db630392ac7795df01 /lib/stdlib/src/gen_fsm.erl | |
parent | 5d530cdfa1f6d7a75f8933b8ce95df8fdbb82b9e (diff) | |
download | otp-6c17eb4036eaa9afba86929821b6ec81a91c2787.tar.gz otp-6c17eb4036eaa9afba86929821b6ec81a91c2787.tar.bz2 otp-6c17eb4036eaa9afba86929821b6ec81a91c2787.zip |
Limit more error_logger terms
Diffstat (limited to 'lib/stdlib/src/gen_fsm.erl')
-rw-r--r-- | lib/stdlib/src/gen_fsm.erl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl index 1b8401305a..6be12437bb 100644 --- a/lib/stdlib/src/gen_fsm.erl +++ b/lib/stdlib/src/gen_fsm.erl @@ -671,28 +671,29 @@ format_log(#{label:={gen_fsm,terminate}, Reason end, {ClientFmt,ClientArgs} = format_client_log(ClientInfo), - LimitedLog = [error_logger:limit_term(D) || D <- Log], {"** State machine ~tp terminating \n" ++ get_msg_str(Msg) ++ "** When State == ~tp~n" "** Data == ~tp~n" "** Reason for termination ==~n** ~tp~n" ++ - case LimitedLog of + case Log of [] -> []; _ -> "** Log ==~n** ~tp~n" end ++ ClientFmt, - [Name|get_msg(Msg)] ++ - [StateName, StateData, Reason1 | - case LimitedLog of + [Name|error_logger:limit_term(get_msg(Msg))] ++ + [StateName, + error_logger:limit_term(StateData), + error_logger:limit_term(Reason1) | + case Log of [] -> []; - _ -> [LimitedLog] + _ -> [[error_logger:limit_term(D) || D <- Log]] end] ++ ClientArgs}; format_log(#{label:={gen_fsm,no_handle_info}, module:=Mod, message:=Msg}) -> {"** Undefined handle_info in ~p~n" "** Unhandled message: ~tp~n", - [Mod, Msg]}. + [Mod, error_logger:limit_term(Msg)]}. get_msg_str({'$gen_event', _Event}) -> "** Last event in was ~tp~n"; @@ -726,7 +727,7 @@ format_client_log({From,remote}) -> format_client_log({_From,{Name,Stacktrace}}) -> {"** Client ~tp stacktrace~n" "** ~tp~n", - [Name, Stacktrace]}. + [Name, error_logger:limit_term(Stacktrace)]}. %%----------------------------------------------------------------- %% Status information |