Abstract Class for Layouts
Abstract Class for Layouts
Layouts may have an additional $read(file, threshold, n) method that returns
a character vector, and/or an $parse(file) method that
returns a data.frame. These can be used by Appenders to $show() methods
and $data active bindings respectively (see source code of AppenderFile).
format_event()Format a log event
Function that the Layout uses to transform a LogEvent into something that an Appender can write to an output destination.
Layout$format_event(event)eventa LogEvent
toString()Layout$toString()
clone()The objects of this class are cloneable with this method.
Layout$clone(deep = FALSE)deepWhether to make a deep clone.
Appenders pass LogEvents to a Layout which formats it for
output. For the Layouts included in lgr that means turning the LogEvent
into a character string.
For each Appender exist one more more possible Layouts, but not every Layout
will work with every Appender. See the package lgrExtra for examples
for Layouts that return different data types (such as data.frames) and
Appenders that can handle them.
Other Layouts:
LayoutFormat,
LayoutGlue,
LayoutJson