Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Pa_lwt_log

module Pa_lwt_log : sig..end

Logging facility

It replaces expression of the form:

Lwt_log.info_f ~section "x = %d" x


by

if Lwt_log.Section.level section <= Lwt_log.Info then
        Lwt_log.info_f ~section "x = %d" x
      else
        return ()


Note:

  • the application must be complete. For example: Log.info "%d" will make compilation to fail
  • it also add the command line flags "-lwt-debug" to keep all debug messages. By default debug messages are removed.