stop_log {lumberjack}R Documentation

Stop logging

Description

Calls the logger's $stop() method if it exists, and removes the logger as attribute from data.

Usage

stop_log(data, logger = NULL, dump = TRUE, ...)

Arguments

data

An R object.

logger

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

dump

['logical'] Toggle dump log file.

...

Passed to the logger's dump method, if it exists.

Value

The data, invisibly.

See Also

Other control: %>>%(), dump_log(), get_log(), run_file(), start_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)


[Package lumberjack version 1.3.1 Index]