aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/sasl_report.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-05-19 14:53:28 +0200
committerHans Bolinder <[email protected]>2017-05-19 14:53:28 +0200
commita8172e4022e3de947c910feb777650be42900059 (patch)
treeff9c44c138217521531df27f0a65c0581de2a94e /lib/sasl/src/sasl_report.erl
parent166d11bb8cbb386dfab4fef37f6f231ac2689b61 (diff)
parent0b1fe37dbcfaad9b28ef529aa4f7b4be60ec5da8 (diff)
downloadotp-a8172e4022e3de947c910feb777650be42900059.tar.gz
otp-a8172e4022e3de947c910feb777650be42900059.tar.bz2
otp-a8172e4022e3de947c910feb777650be42900059.zip
Merge branch 'hasse/kernel/limit_crash_reports/OTP-14417'
* hasse/kernel/limit_crash_reports/OTP-14417: stdlib: Limit the size of gen_statem's error events kernel: Introcude error_logger:get_format_depth() stdlib: Limit the size of proc_lib's crash reports stdlib: Limit the size of gen_server's error events kernel: Add error_logger:limit_term/1 stdlib: Add io_lib:limit_term/2
Diffstat (limited to 'lib/sasl/src/sasl_report.erl')
-rw-r--r--lib/sasl/src/sasl_report.erl14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl
index 14702b0ad2..eb454155d5 100644
--- a/lib/sasl/src/sasl_report.erl
+++ b/lib/sasl/src/sasl_report.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -68,12 +68,12 @@ write_report2(IO, Fd, Head, progress, Report) ->
Format = format_key_val(Report),
write_report_action(IO, Fd, Head, "~s", [Format]);
write_report2(IO, Fd, Head, crash_report, Report) ->
- Depth = get_depth(),
+ Depth = error_logger:get_format_depth(),
Format = proc_lib:format(Report, latin1, Depth),
write_report_action(IO, Fd, Head, "~s", [Format]).
supervisor_format(Args0) ->
- case get_depth() of
+ case error_logger:get_format_depth() of
unlimited ->
{" Supervisor: ~p~n"
" Context: ~p~n"
@@ -102,14 +102,6 @@ format_key_val([{Tag,Data}|Rep]) ->
format_key_val(_) ->
[].
-get_depth() ->
- case application:get_env(kernel, error_logger_format_depth) of
- {ok, Depth} when is_integer(Depth) ->
- max(10, Depth);
- undefined ->
- unlimited
- end.
-
sup_get(Tag, Report) ->
case lists:keysearch(Tag, 1, Report) of
{value, {_, Value}} ->