Skip to contents

Log error with time stamp

Usage

logError(msg)

Arguments

msg

Character values of message to log that leverages cli formatting.

Examples

# Log error
logError(cliFormat("This is an {.strong error} message"))
#>  Error [21/11/2025 - 14:06:15]:  This is an error message
#> 

# Log error with indications
logError(cliFormat(
  "This is an {.strong error} message",
  "Check these {.val values} or this {.fn function}"
))
#>  Error [21/11/2025 - 14:06:15]:  This is an error message
#> → Check these "values" or this `function()`
#>