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 [25/07/2025 - 09:29:47]:  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 [25/07/2025 - 09:29:47]:  This is an error message
#> → Check these "values" or this `function()`
#>