Skip to content

Enable log capture for debugging complex diagnostics

Source: R/utils.R ยท Help: ?ht_enable_log_capture

When enabled, log messages are recorded in memory (and optionally mirrored to a file or connection) for later inspection via ht_log_history().

Usage

ht_enable_log_capture(enabled = TRUE, max_entries = 1000L, sink = NULL)

Arguments

enabled
Logical flag, TRUE to enable capture and FALSE to disable.
max_entries
Maximum number of entries to retain in memory. Older entries are discarded first. Use Inf to keep all entries.
sink
Optional file path or connection to mirror log output.

Value

Invisibly returns NULL.

Deprecated

Deprecated since 0.14.0, with ht_log_history() and ht_clear_log_history(): of the logging functions only ht_set_log_level() stays exported after 1.0.0. They still work and warn.