Skip to contents

Log information with time stamp accounting for message type. Message type will point toward the most appropriate cli function display.

Usage

logInfo(msg, type = "info")

Arguments

msg

Character values of message to log that leverages cli formatting.

type

Name of the message type to toward best cli display:

Examples

# Log information
logInfo(cliFormat("This is an {.strong info} message"))
#>  Info [21/11/2025 - 14:06:16]:  This is an info message
#> 

# Log a title
logInfo(cliFormat("Task: {.strong tic toc test}"), type = "h1")
#> 
#> ── Task: tic toc test ──────────────────────────────────────────────────────────

# Log success
t0 <- tic()
Sys.sleep(3)
logInfo(cliFormat("Task: {.strong tic toc test} completed [{toc(t0, \"s\")}]"), type = "success")
#>  Info [21/11/2025 - 14:06:19]:  Task: tic toc test completed [3.0 s]
#>