Library
Module
Module type
Parameter
Class
Class type
include module type of Lwt_log_core
with type level = Lwt_log_core.level
and type logger = Lwt_log_core.logger
and type section = Lwt_log_core.section
and type template = Lwt_log_core.template
and module Section = Lwt_log_core.Section
val string_of_level : level -> string
val level_of_string : string -> level option
val add_rule : string -> level -> unit
val append_rule : string -> level -> unit
module Section : sig ... end
val close : logger -> unit Lwt.t
val default : logger Stdlib.ref
val null : logger
Lwt logger for js_of_ocaml
val log :
?inspect:'v ->
?exn:exn ->
?section:section ->
?location:(string * int * int) ->
?logger:logger ->
level:level ->
string ->
unit Lwt.t
log ?section ?logger ~level message
logs a message.
section
defaults to Section.main
. If logger
is not specified, then the default one is used instead (see default
).
If exn
is 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 inspect
is provided, it will be append to the message.
location
contains 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 ->
'a
log_f
is the same as log
except that it takes a format string
val ign_log :
?inspect:'v ->
?exn:exn ->
?section:section ->
?location:(string * int * int) ->
?logger:logger ->
level:level ->
string ->
unit
Same as log
but 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 ->
'a
Same as log_f
but ignore the resulting thread.
The following functions are the same as log
except that their name determines which level is used.
For example info msg
is the same as log ~level:Info msg
.