aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorDaniil Fedotov <[email protected]>2017-06-16 17:41:59 +0100
committerHans Bolinder <[email protected]>2017-06-22 08:49:59 +0200
commit112b7d7a1946f6b90b3497ef4c176c6d066571e2 (patch)
treec2cdf595cc0586b70221d0b5f2a482ea4b2cb02a /lib/stdlib/src
parent040bdce67f88d833bfb59adae130a4ffb4c180f0 (diff)
downloadotp-112b7d7a1946f6b90b3497ef4c176c6d066571e2.tar.gz
otp-112b7d7a1946f6b90b3497ef4c176c6d066571e2.tar.bz2
otp-112b7d7a1946f6b90b3497ef4c176c6d066571e2.zip
Support arbitrary crash report in proc_lib.
The `error_logger_format_depth` variable is `unlimited` by default. This can cause errors when logging crash reports using sasl logger, because `io_lib:format("~P"...` does not support `unlimited` as a depth parameter. Use formatter string "~p" for unlimited depth. A way to reproduce the error: Start erl with sasl logger: erl -boot start_sasl -sasl errlog_type error -sasl sasl_error_logger tty Report arbitrary error: error_logger:error_report(crash_report, [fake_crash_report, foo]).
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/proc_lib.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl
index 9ce8e7d60e..a00221fa6a 100644
--- a/lib/stdlib/src/proc_lib.erl
+++ b/lib/stdlib/src/proc_lib.erl
@@ -784,6 +784,8 @@ format_link_report([], _, _) ->
format_report(Rep, Indent, Extra) when is_list(Rep) ->
format_rep(Rep, Indent, Extra);
+format_report(Rep, Indent, {Enc,unlimited}) ->
+ io_lib:format("~s~"++modifier(Enc)++"p~n", [Indent, Rep]);
format_report(Rep, Indent, {Enc,Depth}) ->
io_lib:format("~s~"++modifier(Enc)++"P~n", [Indent, Rep, Depth]).