diff options
author | Lukas Larsson <[email protected]> | 2019-08-20 09:44:43 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-08-20 09:44:43 +0200 |
commit | 4fd424f78a6c25679277c42cf510f277d011355d (patch) | |
tree | bc458dd631ae6dd6b62a06af96a8a91b01b118ea | |
parent | 6f602caf460bdd9217e3b4fa7edca37f0f643ceb (diff) | |
parent | 034ed93975f4f3f81d20f67a34e350bcb053b439 (diff) | |
download | otp-4fd424f78a6c25679277c42cf510f277d011355d.tar.gz otp-4fd424f78a6c25679277c42cf510f277d011355d.tar.bz2 otp-4fd424f78a6c25679277c42cf510f277d011355d.zip |
Merge branch 'maint'
-rw-r--r-- | lib/kernel/src/logger_std_h.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/logger_std_h.erl b/lib/kernel/src/logger_std_h.erl index 2b078ef091..8477a0fc93 100644 --- a/lib/kernel/src/logger_std_h.erl +++ b/lib/kernel/src/logger_std_h.erl @@ -457,12 +457,12 @@ maybe_ensure_file(State) -> %% In order to play well with tools like logrotate, we need to be able %% to re-create the file if it has disappeared (e.g. if rotated by %% logrotate) -ensure_file(#{fd:=Fd0,inode:=INode0,file_name:=FileName,modes:=Modes}=State) -> +ensure_file(#{inode:=INode0,file_name:=FileName,modes:=Modes}=State) -> case file:read_file_info(FileName,[raw]) of {ok,#file_info{inode=INode0}} -> State#{last_check=>timestamp()}; _ -> - close_log_file(Fd0), + close_log_file(State), case file:open(FileName,Modes) of {ok,Fd} -> {ok,#file_info{inode=INode}} = |