aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/doc/src/io_lib.xml34
-rw-r--r--lib/stdlib/src/gen_server.erl4
-rw-r--r--lib/stdlib/src/gen_statem.erl2
-rw-r--r--lib/stdlib/src/proc_lib.erl8
4 files changed, 26 insertions, 22 deletions
diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
index 4a2b425e8e..a3df2897ac 100644
--- a/lib/stdlib/doc/src/io_lib.xml
+++ b/lib/stdlib/doc/src/io_lib.xml
@@ -163,16 +163,20 @@
<p>Returns a character list that represents <c><anno>Data</anno></c>
formatted in accordance with <c><anno>Format</anno></c> in
the same way as
- <seealso marker="#fwrite/2"><c>fwrite/2</c></seealso> and
- <seealso marker="#format/2"><c>format/2</c></seealso>,
- but takes an extra argument, a list of options.</p>
- <p>Available options:</p>
- <taglist>
- <tag><c><anno>CharsLimit</anno></c></tag>
- <item>
- <p>A soft limit on the number of characters returned.</p>
- </item>
- </taglist>
+ <seealso marker="#fwrite/2"><c>fwrite/2</c></seealso> and
+ <seealso marker="#format/2"><c>format/2</c></seealso>,
+ but takes an extra argument, a list of options.</p>
+ <p>Valid option:</p>
+ <taglist>
+ <tag><c>{chars_limit, <anno>CharsLimit</anno>}</c></tag>
+ <item>
+ <p>A soft limit on the number of characters returned.
+ When the number of characters is reached, remaining
+ structures are replaced by "<c>...</c>".
+ <c><anno>CharsLimit</anno></c> defaults to -1, which
+ means no limit on the number of characters returned.</p>
+ </item>
+ </taglist>
</desc>
</func>
@@ -390,11 +394,11 @@
everything below this level is replaced by "<c>...</c>".
<c><anno>Depth</anno></c> defaults to -1, which means
no limitation. Option <c><anno>CharsLimit</anno></c> puts a
- soft limit on the number of characters returned. When the
- number of characters is reached, remaining structures are
- replaced by "<c>...</c>". <c><anno>CharsLimit</anno></c>
- defaults to -1, which means no limit on the number of
- characters returned.</p>
+ soft limit on the number of characters returned. When the
+ number of characters is reached, remaining structures are
+ replaced by "<c>...</c>". <c><anno>CharsLimit</anno></c>
+ defaults to -1, which means no limit on the number of
+ characters returned.</p>
<p><em>Example:</em></p>
<pre>
1> <input>lists:flatten(io_lib:write({1,[2],[3],[4,5],6,7,8,9})).</input>
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index 035dd871ff..09f77c0810 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -934,14 +934,14 @@ format_log(#{label:={gen_server,terminate},
end
end;
_ ->
- logger:limit_term(Reason)
+ error_logger:limit_term(Reason)
end,
{ClientFmt,ClientArgs} = format_client_log(Client),
{"** Generic server ~tp terminating \n"
"** Last message in was ~tp~n"
"** When Server state == ~tp~n"
"** Reason for termination == ~n** ~tp~n" ++ ClientFmt,
- [Name, Msg, logger:limit_term(State), Reason1] ++ ClientArgs};
+ [Name, Msg, error_logger:limit_term(State), Reason1] ++ ClientArgs};
format_log(#{label:={gen_server,no_handle_info},
module:=Mod,
message:=Msg}) ->
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index f558f0d33e..b36b8cd5a5 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -1938,7 +1938,7 @@ format_log(#{label:={gen_statem,terminate},
_ -> {Reason,Stacktrace}
end,
[LimitedP, LimitedFmtData, LimitedFixedReason] =
- [logger:limit_term(D) || D <- [P, FmtData, FixedReason]],
+ [error_logger:limit_term(D) || D <- [P, FmtData, FixedReason]],
CBMode =
case StateEnter of
true ->
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl
index 9094e0c0cd..5f14e78f91 100644
--- a/lib/stdlib/src/proc_lib.erl
+++ b/lib/stdlib/src/proc_lib.erl
@@ -553,10 +553,10 @@ get_ancestors(Pid) ->
%% assumed that all report handlers call proc_lib:format().
get_messages(Pid) ->
Messages = get_process_messages(Pid),
- {messages, logger:limit_term(Messages)}.
+ {messages, error_logger:limit_term(Messages)}.
get_process_messages(Pid) ->
- Depth = logger:get_format_depth(),
+ Depth = error_logger:get_format_depth(),
case Pid =/= self() orelse Depth =:= unlimited of
true ->
{messages, Messages} = get_process_info(Pid, messages),
@@ -586,7 +586,7 @@ get_cleaned_dictionary(Pid) ->
cleaned_dict(Dict) ->
CleanDict = clean_dict(Dict),
- logger:limit_term(CleanDict).
+ error_logger:limit_term(CleanDict).
clean_dict([{'$ancestors',_}|Dict]) ->
clean_dict(Dict);
@@ -756,7 +756,7 @@ check(Res) -> Res.
Args :: [term()].
report_cb(#{label:={proc_lib,crash},
report:=CrashReport}) ->
- Depth = logger:get_format_depth(),
+ Depth = error_logger:get_format_depth(),
get_format_and_args(CrashReport, utf8, Depth).
-spec format(CrashReport) -> string() when