diff options
author | Siri Hansen <[email protected]> | 2018-07-13 12:23:01 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-07-13 12:23:01 +0200 |
commit | 6ff0857f6385848248f38e6315881f6ffc44729f (patch) | |
tree | 56e63d6888873877b3858cd2a6ff6566c7510220 /lib/kernel/src/logger_disk_log_h.erl | |
parent | adb0b077e7ee5b0d9b140bb985b56a43d82927cd (diff) | |
parent | 48824be3d833b13a35b92652df372c6ce3c190a0 (diff) | |
download | otp-6ff0857f6385848248f38e6315881f6ffc44729f.tar.gz otp-6ff0857f6385848248f38e6315881f6ffc44729f.tar.bz2 otp-6ff0857f6385848248f38e6315881f6ffc44729f.zip |
Merge branch 'siri/logger/post-21/OTP-15132' into maint
* siri/logger/post-21/OTP-15132:
[logger] Allow setting kernel parameter 'logger_level' to 'all'
[kernel] Reduce risk of dead lock when terminating logger_sup
[logger] Fix regexp replacement for unicode strings
Update proc_lib:report_cb to obey logger formatter's size limiting params
[logger] Allow report callback with two arguments returning a string
Don't call report_cb from cth_log_redirect - formatter does that
Add legacy test of sasl_report_file_h and size limiting
[logger] Remove compiler warnings in test
[logger] Fix problem with test cases waiting for handler restart
[logger] Add ?LOG macro which takes Level as argument
[logger] Improve spec for set_handler_config/3 and set_primary_config/2
[logger] Generate .png file from .dia
[logger] Update documentation
Diffstat (limited to 'lib/kernel/src/logger_disk_log_h.erl')
-rw-r--r-- | lib/kernel/src/logger_disk_log_h.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/src/logger_disk_log_h.erl b/lib/kernel/src/logger_disk_log_h.erl index 0a72654e11..e56531c3cb 100644 --- a/lib/kernel/src/logger_disk_log_h.erl +++ b/lib/kernel/src/logger_disk_log_h.erl @@ -488,7 +488,8 @@ start(Name, Config, HandlerState) -> type => worker, modules => [?MODULE]}, case supervisor:start_child(logger_sup, LoggerDLH) of - {ok,_Pid,Config1} -> + {ok,Pid,Config1} -> + ok = logger_handler_watcher:register_handler(Name,Pid), {ok,Config1}; Error -> Error @@ -506,8 +507,11 @@ stop(Name) -> %% system termination in order to avoid circular attempts %% at removing the handler (implying deadlocks and %% timeouts). + %% And we don't need to do supervisor:delete_child, since + %% the restart type is temporary, which means that the + %% child specification is automatically removed from the + %% supervisor when the process dies. _ = gen_server:call(Pid, stop), - _ = supervisor:delete_child(logger_sup, Name), ok end. |