diff options
author | iilyak <iilyak@users.noreply.github.com> | 2018-09-12 13:41:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 13:41:27 -0700 |
commit | b4bfc529efdba4b971cd8351dc1fa6b552089744 (patch) | |
tree | 30669ecb06bd934d1b5c067626c358fbeff149fb | |
parent | d56c7281cb9a287835dc278266c304411764aa32 (diff) | |
parent | bc1326bdede743e07d807a4ab41acbff8763a752 (diff) | |
download | couchdb-b4bfc529efdba4b971cd8351dc1fa6b552089744.tar.gz |
Merge pull request #1601 from cloudant/log_file_path_on_crash
Implement couch_file:format_status to log filepath
-rw-r--r-- | src/couch/src/couch_file.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couch/src/couch_file.erl b/src/couch/src/couch_file.erl index 55cb95661..6aa8d0b89 100644 --- a/src/couch/src/couch_file.erl +++ b/src/couch/src/couch_file.erl @@ -47,7 +47,7 @@ -export([last_read/1]). % gen_server callbacks --export([init/1, terminate/2, code_change/3]). +-export([init/1, terminate/2, code_change/3, format_status/2]). -export([handle_call/3, handle_cast/2, handle_info/2]). %% helper functions @@ -526,6 +526,9 @@ handle_info({'DOWN', Ref, process, _Pid, _Info}, #file{db_monitor=Ref}=File) -> false -> {noreply, File} end. +format_status(_Opt, [PDict, #file{} = File]) -> + {_Fd, FilePath} = couch_util:get_value(couch_file_fd, PDict), + [{data, [{"State", File}, {"InitialFilePath", FilePath}]}]. find_header(Fd, Block) -> case (catch load_header(Fd, Block)) of |