This function creates a backup of the specified log file by renaming it with a timestamp. If a backup file already exists, it is removed before creating the new backup.

create_backup(log_file)

Arguments

log_file

A character vector specifying the name of the log file.

Value

NULL (This function is called for its side effect of creating a backup.)

Examples

create_backup("error.log")
#> Error in create_backup("error.log"): could not find function "create_backup"