Log a message with timestamp
log_message.RdPrints a timestamped message to the console. Supports glue-style interpolation of variables from the calling environment. Optionally prints and returns a variable value, useful for debugging pipelines.
Exemplos
# Simple message
log_message("Starting the process...")
#> [2026-04-03 09:18:19] Starting the process...
# With variable interpolation
iso3 <- "KEN"
log_message("Processing {iso3}...")
#> [2026-04-03 09:18:19] Processing KEN...
# With variable return (useful in pipelines)
result <- log_message("Computed value", 42)
#> [2026-04-03 09:18:19] Computed value: 42