File tree Expand file tree Collapse file tree 6 files changed +17
-19
lines changed Expand file tree Collapse file tree 6 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,10 @@ let already_send_ref =
8686
8787let % client handle_error =
8888 ref (fun exn ->
89- Eliom_lib.Lwt_log. ign_info_f ~exn
90- " Exception received on Os_comet's monitor channel: " ;
89+ Logs. info (fun fmt ->
90+ fmt
91+ (" Exception received on Os_comet's monitor channel: " ^^ " @\n %s" )
92+ (Printexc. to_string exn ));
9193 restart_process () ;
9294 Lwt. return_unit)
9395
@@ -96,7 +98,7 @@ let%client set_error_handler f = handle_error := f
9698let % client handle_message = function
9799 | Error exn -> ! handle_error exn
98100 | Ok Heartbeat ->
99- Eliom_lib.Lwt_log. ign_info_f " poum" ;
101+ Logs. info ( fun fmt -> fmt " poum" ) ;
100102 Lwt. return_unit
101103 | Ok Connection_changed ->
102104 Os_msg. msg ~level: `Err
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ let%shared
5050 if ~% onload then Eliom_client. lwt_onload () else Lwt. return_unit
5151 in
5252 let msgbox = msgbox () in
53- Eliom_lib.Lwt_log. ign_info_f " %s" ~% message;
53+ Logs. info ( fun fmt -> fmt " %s" ~% message) ;
5454 Dom. appendChild msgbox message_dom;
5555 let * () = Js_of_ocaml_lwt.Lwt_js. sleep ~% duration in
5656 Dom. removeChild msgbox message_dom;
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ let%shared
323323 Lwt. return_unit)
324324 (fun exn ->
325325 Os_msg. msg ~level: `Err " Error while uploading the picture" ;
326- Eliom_lib.Lwt_log. ign_info_f " %s " ~exn " → " ;
326+ Logs. info ( fun fmt -> fmt " → %s " ( Printexc. to_string exn )) ;
327327 Lwt. return_unit))
328328 : _)]
329329 :: a)
Original file line number Diff line number Diff line change 1+ version=0.28.1
2+ parse-docstrings = false
13break-cases = fit
24break-collection-expressions = fit-or-vertical
35break-fun-decl = wrap
Original file line number Diff line number Diff line change @@ -53,24 +53,19 @@ let%server () =
5353(* Print more debugging information when <debugmode/> is in config file
5454 (DEBUG = yes in Makefile.options).
5555 Example of use:
56- let section = Lwt_log.Section.make "%%%MODULE_NAME%%%:sectionname"
56+ let section = Logs.Src.create "%%%MODULE_NAME%%%:sectionname"
5757 ...
58- Lwt_log.ign_info ~ section "This is an information" ;
59- (or ign_debug, ign_warning, ign_error etc.)
58+ Logs.info ~src: section (fun fmt -> "This is an information %i " 1) ;
59+ (or Logs.debug, Logs.err etc.)
6060*)
6161let % server _ =
6262 if Eliom_config. get_debugmode ()
6363 then (
64- ignore
64+ (* ignore
6565 [%client
66- ((* Eliom_config.debug_timings := true; *)
67- (* Lwt_log_core.add_rule "eliom:client*" Lwt_log_js.Debug; *)
68- (* Lwt_log_core.add_rule "os*" Lwt_log_js.Debug; *)
69- Lwt_log_core. add_rule " %%%MODULE_NAME%%%*" Lwt_log_js. Debug
70- (* Lwt_log_core.add_rule "*" Lwt_log_js.Debug *)
71- : unit )];
72- (* Lwt_log_core.add_rule "*" Lwt_log.Debug *)
73- Lwt_log_core. add_rule " %%%MODULE_NAME%%%*" Lwt_log. Debug )
66+ (Eliom_config.debug_timings := true
67+ : unit)]; *)
68+ Logs. set_level (Some Logs. Debug ))
7469
7570(* The modules below are all the modules that needs to be explicitely
7671 linked-in. *)
Original file line number Diff line number Diff line change @@ -148,5 +148,4 @@ let _ =
148148 debugger console, you can do so by uncommenting the following
149149 lines. *)
150150(* let () = Eliom_config.debug_timings := true *)
151- (* let () = Lwt_log_core.add_rule "eliom:client*" Lwt_log_js.Debug *)
152- (* let () = Lwt_log_core.add_rule "os*" Lwt_log_js.Debug *)
151+ (* let () = Logs.set_level (Some Logs.Debug) *)
You can’t perform that action at this time.
0 commit comments