Module Lwt_log_js
include module type of Lwt_log_core with type Lwt_log_js.level = Lwt_log_core.level and type Lwt_log_js.logger = Lwt_log_core.logger and type Lwt_log_js.section = Lwt_log_core.section and type Lwt_log_js.template = Lwt_log_core.template and module Lwt_log_js.Section = Lwt_log_core.Section
type level= Lwt_log_core.level=|Debug|Info|Notice|Warning|Error|Fataltype logger= Lwt_log_core.loggertype section= Lwt_log_core.section
val string_of_level : level -> stringval level_of_string : string -> level optionval load_rules : ?fail_on_error:bool -> string -> unitval add_rule : string -> level -> unitval append_rule : string -> level -> unitval reset_rules : unit -> unitval log : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> string -> unit Lwt.tval log_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_log : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> string -> unitval ign_log_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> ('a, unit, string, unit) Stdlib.format4 -> 'aval debug : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval debug_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_debug : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_debug_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval info : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval info_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_info : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_info_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval notice : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval notice_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_notice : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_notice_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval warning : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval warning_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_warning : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_warning_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval error : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval error_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_error : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_error_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval fatal : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval fatal_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_fatal : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_fatal_f : ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'a
module Section : sig ... endPredefined logger
Logging functions
val log : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> string -> unit Lwt.tlog ?section ?logger ~level messagelogs a message.sectiondefaults toSection.main. Ifloggeris not specified, then the default one is used instead (seedefault).If
exnis provided, then its string representation (=Printexc.to_string exn) will be append to the message, and if possible the backtrace will also be logged.If
inspectis provided, it will be append to the message.locationcontains the location of the logging directive, it is of the form(file_name, line, column).
val log_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'alog_fis the same aslogexcept that it takes a format string
val ign_log : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> string -> unitSame as
logbut ignore the resulting thread.
val ign_log_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> level:level -> ('a, unit, string, unit) Stdlib.format4 -> 'aSame as
log_fbut ignore the resulting thread.
val debug : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval debug_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_debug : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_debug_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval info : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval info_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_info : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_info_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval notice : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval notice_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_notice : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_notice_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval warning : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval warning_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_warning : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_warning_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval error : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval error_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_error : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_error_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'aval fatal : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unit Lwt.tval fatal_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit Lwt.t) Stdlib.format4 -> 'aval ign_fatal : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> string -> unitval ign_fatal_f : ?inspect:'v -> ?exn:exn -> ?section:section -> ?location:(string * int * int) -> ?logger:logger -> ('a, unit, string, unit) Stdlib.format4 -> 'a