Skip to content

Commit f34d425

Browse files
committed
Disable noisy logging
1 parent 74a4ba0 commit f34d425

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/main.ml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,17 @@ let static_routes =
203203

204204
let serve () =
205205
Printexc.record_backtrace true ;
206+
Dream.initialize_log ~level:Env.log_level () ;
207+
List.iter (fun src ->
208+
match Logs.Src.name src with
209+
(* useless noise on debug level *)
210+
| "cohttp.lwt.io" | "cohttp.lwt.server" | "tls.tracing" | "tls.config" ->
211+
Logs.Src.set_level src None
212+
| _ ->
213+
() )
214+
@@ Logs.Src.list () ;
206215
let%lwt db = Data_store.connect ~create:true () in
207216
S3.Backup.start () ;
208-
Dream.initialize_log ~level:`Debug () ;
209217
Dream.serve ~interface:"0.0.0.0" ~port:8008
210218
@@ Dream.pipeline
211219
[ Dream.logger

0 commit comments

Comments
 (0)