dump_log: Dump logging data

View source: R/lumberjack.R

dump_logR Documentation

Dump logging data

Description

Calls the $dump(...) method of logger(s) tracking an R object.

Usage

dump_log(data, logger = NULL, stop = TRUE, ...)

Arguments

data

An R object tracked by one or more loggers.

logger

[character] vector. Class names of loggers to dump (e.g. "simple"). When loggers=NULL, all loggers are dumped for this object.

stop

[logical] stop logging after the dump? Removes the logger(s) tracking the object.

...

Arguments passed to the dump method of the logger.

Value

data, invisibly.

See Also

Other control: %>>%(), get_log(), run_file(), start_log(), stop_log()

Examples

logfile <- tempfile(fileext=".csv")
women %L>%
  start_log(logger=simple$new()) %L>%
  transform(height_cm = height*2.52) %L>%
  dump_log(file=logfile)
logdata <- read.csv(logfile)
head(logdata)



lumberjack documentation built on March 31, 2023, 7:56 p.m.