aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/error_logger_file_h.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-05-17 16:16:58 +0200
committerHans Bolinder <[email protected]>2017-05-18 15:36:34 +0200
commita99b0a2a570e7429b05f3ce424880744ee3a8814 (patch)
treec31d739d10110daff37488431c9f16c42ea05d4b /lib/stdlib/src/error_logger_file_h.erl
parent86a74bfaefd570245740624d85659efa8821765b (diff)
downloadotp-a99b0a2a570e7429b05f3ce424880744ee3a8814.tar.gz
otp-a99b0a2a570e7429b05f3ce424880744ee3a8814.tar.bz2
otp-a99b0a2a570e7429b05f3ce424880744ee3a8814.zip
kernel: Introcude error_logger:get_format_depth()
Diffstat (limited to 'lib/stdlib/src/error_logger_file_h.erl')
-rw-r--r--lib/stdlib/src/error_logger_file_h.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
index 0b262de3ab..76f89841b9 100644
--- a/lib/stdlib/src/error_logger_file_h.erl
+++ b/lib/stdlib/src/error_logger_file_h.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.
@@ -57,7 +57,7 @@ init(File, PrevHandler) ->
process_flag(trap_exit, true),
case file:open(File, [write]) of
{ok,Fd} ->
- Depth = get_depth(),
+ Depth = error_logger:get_format_depth(),
State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
depth=Depth},
{ok, State};
@@ -65,14 +65,6 @@ init(File, PrevHandler) ->
Error
end.
-get_depth() ->
- case application:get_env(kernel, error_logger_format_depth) of
- {ok, Depth} when is_integer(Depth) ->
- max(10, Depth);
- undefined ->
- unlimited
- end.
-
handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
{ok, State};
handle_event(Event, State) ->