Skip to content

Commit 5f8cf69

Browse files
committed
fixup! http-lib: add backtrace to logs on connection without response
1 parent 4946dcc commit 5f8cf69

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ocaml/libs/http-lib/http_client.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ let response_of_fd_exn fd =
177177
(Astring.String.cuts ~sep:"\n" buf)
178178
)
179179

180+
(* Use a different logging brand, the one used by {D} is ignore in the default
181+
configuration. This allows to have visibility of an issue that interrupts
182+
storage migrations. *)
183+
module L = Debug.Make (struct let name = __MODULE__ end)
184+
180185
(** [response_of_fd fd] returns an optional Http.Response.t record *)
181186
let response_of_fd ?(use_fastpath = false) fd =
182187
try
@@ -191,7 +196,7 @@ let response_of_fd ?(use_fastpath = false) fd =
191196
Backtrace.is_important e ;
192197
let bt = Backtrace.get e in
193198
Debug.log_backtrace e bt ;
194-
D.debug "%s: returning no response because of the exception: %s"
199+
L.debug "%s: returning no response because of the exception: %s"
195200
__FUNCTION__ (Printexc.to_string e) ;
196201
None
197202

0 commit comments

Comments
 (0)