aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-04-25 15:48:09 +0200
committerSiri Hansen <[email protected]>2018-04-26 14:37:31 +0200
commitc54be0299219c32e5b66df952cf6d260ef2dadfa (patch)
treeffbe83b90bdb50fd62bf5333de98a880380a50c4 /lib
parent8fdb08867df346625fab13c596dad05ed37ae5ac (diff)
downloadotp-c54be0299219c32e5b66df952cf6d260ef2dadfa.tar.gz
otp-c54be0299219c32e5b66df952cf6d260ef2dadfa.tar.bz2
otp-c54be0299219c32e5b66df952cf6d260ef2dadfa.zip
Set call timeout for logger_server to infinity
This is to avoid failing starts when running make with '-j', i.e. maximum parallell make (or on extremely slow machines).
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/logger_h_common.hrl2
-rw-r--r--lib/kernel/src/logger_internal.hrl4
-rw-r--r--lib/kernel/src/logger_simple.erl2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/src/logger_h_common.hrl b/lib/kernel/src/logger_h_common.hrl
index f110bbaf97..89378dbb10 100644
--- a/lib/kernel/src/logger_h_common.hrl
+++ b/lib/kernel/src/logger_h_common.hrl
@@ -195,7 +195,7 @@
-define(file_datasync(DEVICE), file:datasync(DEVICE)).
-define(disk_log_blog(LOG, DATA), disk_log:blog(LOG, DATA)).
-define(disk_log_sync(LOG), disk_log:sync(LOG)).
- -define(DEFAULT_CALL_TIMEOUT, ?DEFAULT_LOGGER_CALL_TIMEOUT-2000).
+ -define(DEFAULT_CALL_TIMEOUT, 10000).
-endif.
%%%-----------------------------------------------------------------
diff --git a/lib/kernel/src/logger_internal.hrl b/lib/kernel/src/logger_internal.hrl
index 8fcaba8de6..82df499c2b 100644
--- a/lib/kernel/src/logger_internal.hrl
+++ b/lib/kernel/src/logger_internal.hrl
@@ -23,7 +23,6 @@
-define(HANDLER_KEY,'$handler_config$').
-define(LOGGER_META_KEY,'$logger_metadata$').
-define(STANDARD_HANDLER, logger_std_h).
--define(DEFAULT_LOGGER_CALL_TIMEOUT, 10000).
-define(DEFAULT_HANDLER_FILTERS,
?DEFAULT_HANDLER_FILTERS([beam,erlang,otp])).
-define(DEFAULT_HANDLER_FILTERS(Domain),
@@ -40,9 +39,12 @@
-define(DEFAULT_FORMAT_TEMPLATE,
[time," ",level,":\n",msg,"\n"]).
+-define(DEFAULT_LOGGER_CALL_TIMEOUT, infinity).
+
-define(LOG_INTERNAL(Level,Report),
case logger:allow(Level,?MODULE) of
true ->
+ %% Spawn this to avoid deadlocks
_ = spawn(logger,macro_log,[?LOCATION,Level,Report,
logger:add_default_metadata(#{})]),
ok;
diff --git a/lib/kernel/src/logger_simple.erl b/lib/kernel/src/logger_simple.erl
index 61387ac7c9..23ff6ccd2e 100644
--- a/lib/kernel/src/logger_simple.erl
+++ b/lib/kernel/src/logger_simple.erl
@@ -161,8 +161,6 @@ do_log(#{msg:={report,Report},
display_date(T),
display_report(Type,Report);
do_log(#{msg:=Msg,meta:=#{time:=T}}) ->
- %% Maybe buffer event - if next handler shall be able to
- %% re-display it
display_date(T),
display(Msg).