Given a filename parameter, this command creates a logfile with the specified file name. If the file already exists, it is opened for appending. If the file does not exist, it is created. If the filename is omitted, then the logging flag is toggled.
If you open an existing log file, the results will be appended unless you specify "new" as the second parameter in which case a new log file is created.