From c54be0299219c32e5b66df952cf6d260ef2dadfa Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 25 Apr 2018 15:48:09 +0200 Subject: 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). --- lib/kernel/src/logger_h_common.hrl | 2 +- lib/kernel/src/logger_internal.hrl | 4 +++- lib/kernel/src/logger_simple.erl | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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). -- cgit v1.2.3