Skip to content

Commit 05a04f5

Browse files
committed
Dream.run: warn on any use of ~adjust_terminal
1 parent ea262bc commit 05a04f5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/http/http.ml

+6-5
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ let run
682682
?key_file
683683
?(builtins = true)
684684
?(greeting = true)
685-
?(adjust_terminal = false)
685+
?adjust_terminal
686686
user's_dream_handler =
687687

688688
let () = if Sys.unix then
@@ -691,10 +691,11 @@ let run
691691

692692
let log = Log.convenience_log in
693693

694-
if adjust_terminal then begin
695-
log "%s %s"
696-
"The '~adjust_terminal' option is deprecated and will be removed in a"
697-
"future release. Dream no longer truncates long log lines."
694+
(* This should be removed, together with ~adjust_terminal, after a few
695+
releases. The warning is present since 1.0.0~alpha7. *)
696+
if adjust_terminal <> None then begin
697+
Error_handler.log.warning (fun log ->
698+
log "Dream.run: ~adjust_terminal is deprecated")
698699
end;
699700

700701
if greeting then begin

0 commit comments

Comments
 (0)