read_logs: Return log file as an R data frame

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This function returns a data.frame containing all the logs in the provided ndjson log file. If no explicit log file is provided, calling this function will return a data frame of the log file currently pointed to by the loggit functions.

Usage

1
read_logs(logfile, unsanitizer)

Arguments

logfile

Path to log file. Will default to currently-set log file.

unsanitizer

Unsanitizer function to use. For more info on sanitizers, please see the sanitizers section of the package documentation.

Value

A data.frame.

Examples

1
2
3
  set_logfile(file.path(tempdir(), "loggit.log"), confirm = FALSE)
  message("Test log message")
  read_logs()

loggit documentation built on Feb. 28, 2021, 9:06 a.m.