Skip to content

Commit 8e74888

Browse files
authored
Merge pull request #384 from emillon/logs-lwt
Use logs.lwt instead of lwt_logs
2 parents 2569162 + 6c55ea7 commit 8e74888

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/lib/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(wrapped false)
55
(flags :standard -safe-string)
66
(modes byte)
7-
(libraries compiler-libs.toplevel findlib.top lambda-term threads zed)
7+
(libraries compiler-libs.toplevel findlib.top lambda-term logs.lwt threads zed)
88
(preprocess
99
(action
1010
(run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file}))))

src/lib/uTop_main.ml

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let save_history () =
5353
?max_entries:!UTop.history_file_max_entries fn)
5454
(function
5555
| Unix.Unix_error (error, func, arg) ->
56-
Lwt_log.error_f "cannot save history to %S: %s: %s" fn func (Unix.error_message error)
56+
Logs_lwt.err (fun m -> m "cannot save history to %S: %s: %s" fn func (Unix.error_message error))
5757
| exn -> Lwt.fail exn)
5858

5959
let init_history () =
@@ -68,8 +68,8 @@ let init_history () =
6868
(fun () -> LTerm_history.load UTop.history fn)
6969
(function
7070
| Unix.Unix_error (error, func, arg) ->
71-
Lwt_log.error_f "cannot load history from %S: %s: %s"
72-
fn func (Unix.error_message error)
71+
Logs_lwt.err (fun m -> m "cannot load history from %S: %s: %s"
72+
fn func (Unix.error_message error))
7373
| exn -> Lwt.fail exn)
7474

7575
(* +-----------------------------------------------------------------+
@@ -1590,9 +1590,9 @@ let load_inputrc () =
15901590
LTerm_inputrc.load
15911591
(function
15921592
| Unix.Unix_error (error, func, arg) ->
1593-
Lwt_log.error_f "cannot load key bindings from %S: %s: %s" LTerm_inputrc.default func (Unix.error_message error)
1593+
Logs_lwt.err (fun m -> m "cannot load key bindings from %S: %s: %s" LTerm_inputrc.default func (Unix.error_message error))
15941594
| LTerm_inputrc.Parse_error (fname, line, msg) ->
1595-
Lwt_log.error_f "error in key bindings file %S, line %d: %s" fname line msg
1595+
Logs_lwt.err (fun m -> m "error in key bindings file %S, line %d: %s" fname line msg)
15961596
| exn -> Lwt.fail exn)
15971597

15981598
let protocol_version = 1

src/lib/uTop_styles.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ let load () =
9595
| Unix.Unix_error(Unix.ENOENT, _, _) ->
9696
return ()
9797
| Unix.Unix_error (error, func, _arg) ->
98-
Lwt_log.error_f "cannot load styles from %S: %s: %s" fn func (Unix.error_message error)
98+
Logs_lwt.err (fun m -> m "cannot load styles from %S: %s: %s" fn func (Unix.error_message error))
9999
| exn -> Lwt.fail exn)
100100

101101
let stylise_filter_layout stylise tokens =

utop.opam

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ depends: [
1111
"base-threads"
1212
"ocamlfind" {>= "1.7.2"}
1313
"lambda-term" {>= "3.1.0" & < "4.0"}
14+
"logs"
1415
"lwt"
1516
"lwt_react"
1617
"zed" { >= "3.2.0" }

0 commit comments

Comments
 (0)