module Layout:This module defines the concept of layout, that is how an event is rendered into a string. It is possible to register new layouts through the
registerfunction. Initially, all the layouts defined in this file (except
csv) are registered (using the function name as the registration name).
string list * string list * (Event.t -> string)
val register :
string -> t -> unit
register n lregisters the layout
n, replacing any existing layout with the same name.
val register_unnamed :
t -> string
registerexcept that an unused name is generated and returned.
val get :
string -> t
get nreturns the layout registered with name
Not_found if no layout exists with the passed name.
val minimal :
val simple :
LEVEL - MESSAGE
val default :
TIME [FILE LINE] LEVEL MESSAGE
val pattern :
string list -> string list -> string -> t
pattern h f rconstructs a layout
(h, f, r')where
r'is the rendering function defined by the string
r. The rendering is done by substituting the substring of the form
"$(key:pad)"with their associated values. The key/value associations are as defined by the function
Event.bindings. The absolute value of pad defines the minimum size of the value when rendered. Moreover, if pad is negative padding spaces are added on the left while they are added to the right if pad is positive.
val html :
val csv :
string -> string list -> t
csv sep lconstructs a layout
(, , f)where
fis the rendering function defined by:
septhe CSV separator;
lthe list of elements (referred to through keys) to output for each CSV record, (the available keys are those defined by