LayoutElasticSearch {lgrExtra}R Documentation

Format log events for output to ElasticSearch

Description

Similar to lgr::LayoutJson, but with some modifications to prepare data for ElasticSearch.

Value

The ⁠$new()⁠ method returns an R6::R6 that inherits from lgr::Layout and can used as a Layout by an lgr::Appender.

Super class

lgr::Layout -> LayoutElasticSearch

Active bindings

toJSON_args

a list of values passed on to jsonlite::toJSON()

transform_event

a function with a single argument event that takes a lgr::LogEvent and returns a list.

Methods

Public methods

Inherited methods

Method new()

Usage
LayoutElasticSearch$new(
  toJSON_args = list(auto_unbox = TRUE),
  transform_event = function(event) get("values", event)
)

Method format_event()

Usage
LayoutElasticSearch$format_event(event)

Method set_toJSON_args()

Usage
LayoutElasticSearch$set_toJSON_args(x)

Method set_transform_event()

Usage
LayoutElasticSearch$set_transform_event(x)

Method clone()

The objects of this class are cloneable with this method.

Usage
LayoutElasticSearch$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other Layout: LayoutDbi


[Package lgrExtra version 0.0.8 Index]