Returns everything a logtree_sink_memory() sink has collected so far, as a
data frame with one row per event and the same columns a "json" file sink
writes (see logtree_sink_file()), so the two views of a run agree:
Arguments
- id
A memory sink's id, as returned by
logtree_sink_memory().
Value
A data frame with one row per collected event, oldest first, and zero rows (with the columns above) when nothing has been logged yet.
Details
| Column | What it holds |
ts | when the event was emitted (POSIXct) |
level | event kind: "open", "close", "group", "group_close", "leaf" |
id, parent_id, depth | the node's identity and place in the tree |
label | a step's label, a group's name, or a leaf's message |
elapsed | seconds, on close lines only; NA elsewhere |
status | a leaf's status, "step"/"group" on an opening line, or the resolved status on a close |
fn, file, line | the call site, when the trace theme slot recorded one; NA otherwise |
Examples
logtree_reset()
h <- logtree_sink_memory()
f <- function() log_info("Reading config.yml")
invisible(f())
#> ℹ Reading config.yml
logtree_sink_memory_events(h)
#> ts run_id level id parent_id depth
#> 1 2026-08-11 14:28:54 20260811T142854.882-6905-20 leaf 1 0 0
#> label elapsed status fn file line
#> 1 Reading config.yml NA info f <NA> NA
logtree_sink_remove(h)
