| CreateTimeStampCliEnv | R Documentation |
Generates an environment containing wrapped versions of common CLI functions that automatically include timestamps in their output. This provides a convenient way to use multiple CLI functions with consistent timestamping.
CreateTimeStampCliEnv(
cli_functions = c("cli_alert_info", "cli_alert_success", "cli_alert_warning",
"cli_alert_danger")
)
cli_functions |
from package |
This function creates a new environment and populates it with timestamped
versions of commonly used CLI functions from the cli package. Only
functions that exist in the loaded cli package are added to the
environment. The function uses walk for side-effect
iteration over the function names.
Returns an environment containing timestamp-wrapped versions of:
cli_warn
cli_alert_info
cli_alert_success
cli_alert_warning
cli_alert_danger
Each function in the environment will automatically prepend timestamps to its output messages.
AddTimeStamp2cli for the wrapper function used internally.
Other TimeStamp:
AddTimeStamp2cli(),
TimeStamp()
## Not run:
# Create environment with timestamped CLI functions
cli_env <- CreateTimeStampCliEnv()
# Use timestamped functions
cli_env$cli_alert_info("System started")
cli_env$cli_alert_success("Operation completed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.