Legend:
Library
Module
Module type
Parameter
Class
Class type
Debugging output for Cohttp Unix
val default_reporter : Logs.reporter
default_reporter provides a simple reporter that sends the logging output to stderr. For example, the code below enables logging at level level to stderr, using coloured output if possible.
activate_debug enables debugging output that will be sent to standard error.
val debug_active : unit -> bool
debug_active returns true if activate_debug has been called and false otherwise
Selectively disable cohttp logging
It is possible to selectively disable cohttp internal logginb by filtering over the various modules logs names as follows.
(* Set log level v for all loggers, this does also affect cohttp internal loggers *)
Logs.set_level ~all:true level;
(* Disable all cohttp-lwt and cohttp-lwt-unix logs *)
List.iter (fun src ->
match Logs.Src.name src with
| "cohttp.lwt.io" | "cohttp.lwt.server" -> Logs.Src.set_level src None
| _ -> ())
@@ Logs.Src.list ()