File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ let read_env_config = State.read_env_config
142142(* *
143143 param [lines]: whether to split multiline message as separate log lines (default [true])
144144
145- param [backtrace]: whether to show backtrace (default is [true] if [exn] is given and backtrace recording is enabled )
145+ param [backtrace]: whether to show backtrace if [exn] is given (default is [false] )
146146
147147 param [saved_backtrace]: supply backtrace to show instead of using [Printexc.get_backtrace]
148148*)
@@ -163,15 +163,15 @@ let make_s output_line =
163163 output lines facil (s ^ " : exn " ^ Exn. str exn ^ (if bt = [] then " (no backtrace)" else " " ));
164164 List. iter (fun line -> output_line facil (" " ^ line)) bt
165165 in
166- fun ?exn ?(lines =true ) ?backtrace ?saved_backtrace s ->
166+ fun ?exn ?(lines =true ) ?( backtrace = false ) ?saved_backtrace s ->
167167 try
168168 match exn with
169169 | None -> output lines facil s
170170 | Some exn ->
171171 match saved_backtrace with
172172 | Some bt -> print_bt lines exn bt s
173173 | None ->
174- match Option. default ( Printexc. backtrace_status () ) backtrace with
174+ match backtrace with
175175 | true -> print_bt lines exn (Exn. get_backtrace () ) s
176176 | false -> output lines facil (s ^ " : exn " ^ Exn. str exn )
177177 with exn ->
You can’t perform that action at this time.
0 commit comments