cleanup_old_logfile: Archives the current logfile and creates a new blank one.
Description
This function is called once at the beginning of the
runtime of the tool. It checks whether there is an old logfile
and renames it (if existing) to "logfile_20xx-xx-xx-xxxxxx.log".
Then a new, empty, logfile "logfile.log" is created.
Usage
cleanup_old_logfile(logfile_dir)
Arguments
logfile_dir
(Optional, String, default: "tempdir()")
The absolute path to folder where the logfile will be stored.
Value
No return value, called for side effects (see description)