Serializers are used by AppenderDbi to store multiple values in a single text column in a Database table. Usually you just want to use the default SerializerJson. Please not that AppenderDbi as well as Serializers are still experimental.

Value

a Serializer

R6::R6 object for AppenderDbi.

Methods

Public methods


Method clone()

The objects of this class are cloneable with this method.

Usage

Serializer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super class

lgrExtra::Serializer -> SerializerJson

Methods


Method new()

Usage

SerializerJson$new(
  cols = "*",
  cols_exclude = c("level", "timestamp", "logger", "caller", "msg"),
  col_filter = is.atomic,
  max_nchar = 2048L,
  auto_unbox = TRUE
)


Method serialize()

Usage

SerializerJson$serialize(event)


Method clone()

The objects of this class are cloneable with this method.

Usage

SerializerJson$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# The defaul Serializer for 'custom fields' columns
SerializerJson$new()
#> <SerializerJson>
#>   Inherits from: <Serializer>
#>   Public:
#>     auto_unbox: TRUE
#>     clone: function (deep = FALSE) 
#>     col_filter: function (x) 
#>     cols: *
#>     cols_exclude: level timestamp logger caller msg
#>     initialize: function (cols = "*", cols_exclude = c("level", "timestamp", 
#>     max_nchar: function (x, type = "chars", allowNA = FALSE, keepNA = NA) 
#>     serialize: function (event)