Learn R Programming

lgr (version 0.3.4)

AppenderTable: Abstract class for logging to tabular structures

Description

Abstract classes are exported for package developers that want to extend them, they cannot be instantiated directly.

AppenderTable is extended by Appenders that write to a data source that can be interpreted as tables, (usually a data.frame). Examples are AppenderDbi, AppenderRjdbc and AppenderDt.

Arguments

Fields

data

Get the log recorded by this Appender as a data.frame

threshold, set_threshold(level)

character or integer scalar. The minimum log level that triggers this logger. See log_levels

layout, set_layout(layout)

a Layout that will be used for formatting the LogEvents passed to this Appender

destination

The output destination of the Appender in human-readable form (mainly for print output)

filters, set_filters(filters)

a list that may contain functions or any R object with a filter() method. These functions must have exactly one argument: event which will get passed the LogEvent when the Filterable's filter() method is invoked. If all of these functions evaluate to TRUE the LogEvent is passed on. Since LogEvents have reference semantics, filters can also be abused to modify them before they are passed on. Look at the source code of with_log_level() or with_log_value() for examples.

Methods

show(n, threshold)

Show the last n log entries with a log level bellow threshold.

append(event)

Tell the Appender to process a LogEvent event. This method is usually not called by the user, but invoked by a Logger

filter(event)

Determine whether the LogEvent x should be passed on to Appenders (TRUE) or not (FALSE). See also the active binding filters

add_filter(filter, name = NULL), remove_filter(pos)

Add or remove a filter. When adding a filter an optional name can be specified. remove_filter() can remove by position or name (if one was specified)

See Also

Other abstract classes: AppenderDigest, AppenderMail, AppenderMemory, Filterable

Other Appenders: AppenderBuffer, AppenderConsole, AppenderDbi, AppenderFileRotating, AppenderFile, AppenderGmail, AppenderJson, AppenderPushbullet, AppenderRjdbc, AppenderSendmail, AppenderSyslog, Appender