Module Assemblage.Log

module Log: sig .. end
Assemblage log.

Log provides functions to log messages from assemble files. It is also used by the assemblage library itself. The log's output is controlled by drivers.



Log level


type level = 
| Show
| Error
| Warning
| Info
| Debug
The type for log levels.
val msg : ?header:string ->
level ->
('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
msg header l fmt ... logs a message with level l. header is the message header, default depends on l.
val kmsg : ?header:string ->
(unit -> 'a) ->
level ->
('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'b
kmsg header k l fmt ... is like msg header l fmt but calls k () before returning.
val show : ?header:string -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
show fmt ... logs a message with level Show. header defaults to None.
val err : ?header:string -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
err fmt ... logs a message with level Error. header defaults to "ERROR".
val warn : ?header:string -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
warn fmt ... logs a message with level Warning. header defaults to "WARNING".
val info : ?header:string -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
info fmt ... logs a message with level Info. header defaults to "INFO".
val debug : ?header:string -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
debug info ... logs a message with level Debug. header defaults to "DEBUG".