survey_log: Return the log contents of a strata log file as a tibble

View source: R/survey-core.R

survey_logR Documentation

Return the log contents of a strata log file as a tibble

Description

If users decide to pipe the results of main() or any of the logging-related functions into a log file, the contents of log file can be parsed and stored in a tibble using survey_log(). Only the messages from the ⁠log_*()⁠ functions will be parsed, all other output from the code will be ignored.

Usage

survey_log(log_path)

Arguments

log_path

Path to the log file

Value

A tibble of the contents of the log file

See Also

Other survey: survey_strata(), survey_tomls()

Other log: log_error(), log_message(), log_total_time()

Examples

tmp <- fs::dir_create(fs::file_temp())
log <- fs::file_create(fs::path(tmp, "main.log"))
fake_log_message <- log_message("example message")
cat(fake_log_message, file = log)
survey_log(log)
fs::dir_delete(tmp)

strata documentation built on April 12, 2025, 2:20 a.m.