File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -358,13 +358,17 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with
358358 | Some (`Raw (ct ,body )) -> sprintf " %s \" %s\" " ct (Stre. shorten ~escape: true 64 body)
359359 | Some (`Chunked (ct ,_f )) -> sprintf " %s chunked" ct
360360 in
361- let pairs = [
362- " method" , action_name;
363- " http_seq" , string_of_int nr_http;
364- " url" , url;
365- ] in
366- let pairs = if body = " " then pairs else (" body" , body) :: pairs in
367- log #info ~pairs " http start"
361+
362+ match Log.State. get_cur_format () with
363+ | `Plain , _ -> log #info " %s #%d %s %s" action_name nr_http url body
364+ | `Logfmt , _ ->
365+ let pairs = [
366+ " method" , action_name;
367+ " http_seq" , string_of_int nr_http;
368+ " url" , url;
369+ ] in
370+ let pairs = if body = " " then pairs else (" body" , body) :: pairs in
371+ log #info ~pairs " http start"
368372 end ;
369373
370374 let describe () =
You can’t perform that action at this time.
0 commit comments