Description Usage Arguments Details Value
This is the default ndJSON sanitizer function for log data being read into
the R session by read_logs()
. This type of function is needed because since
loggit
reimplements its own string-based JSON parser, and not a fancy one
built from an AST or something, it's very easy to have bad patterns break
your logs. You may also specify your own sanitizer function to pass to
loggit()
, which takes a single string and returns an
(optionally-transformed) string, where each string is an individual element
of the log data.
1 2 3 | default_ndjson_sanitizer(string, sanitize = TRUE)
default_ndjson_unsanitizer(string)
|
string |
Each element of the log data to operate on. Note that this is
each element, not each line in the logs. For example, each entry in the
|
sanitize |
Whether the operation will sanitize, or unsanitize the log
data. Defaults to |
The default string patterns and their replacements are currently mapped as follows:
Character | Replacement in log file |
{ | __LEFTBRACE__ |
} | __RIGHTBRACE__ |
" | __DBLQUOTE__ |
, | __COMMA__ |
\r | __CR__ |
\n | __LF__ |
A single string.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.