read_logs: Get log as 'data.frame'

View source: R/utils.R

read_logsR Documentation

Get log as data.frame

Description

Returns a data.frame containing all the logs in the provided ndjson log file.

Usage

read_logs(logfile = get_logfile(), unsanitize = TRUE, last_first = FALSE)

Arguments

logfile

Path to log file to read from.

unsanitize

Should escaped special characters be unescaped?

last_first

Should the last log entry be the first row of the data frame?

Details

read_logs() returns a data.frame with the empty character columns "timestamp", "log_lvl" and "log_msg" if the log file has no entries.

Value

A data.frame, with the columns as the fields in the log file.

Examples

## Not run: 
  read_logs()

  read_logs(last_first = TRUE)

## End(Not run)

loggit2 documentation built on June 8, 2025, 10:26 a.m.