Learn R Programming

joinspy (version 0.7.3)

set_log_file: Configure Automatic Logging

Description

Sets up automatic logging of all join reports to a specified file. When enabled, every *_join_spy() call will append its report to the log.

Usage

set_log_file(file, format = c("text", "json"))

Value

Invisibly returns the previous log file setting.

Arguments

file

File path for automatic logging. Set to NULL to disable.

format

Log format: "text" (default) or "json".

See Also

log_report(), get_log_file()

Examples

Run this code
# Enable automatic logging to temp file
tmp <- tempfile(fileext = ".log")
old <- set_log_file(tmp)

# Disable logging and clean up
set_log_file(NULL)
unlink(tmp)

Run the code above in your browser using DataLab