set_log_file

set_log_file — sets the file and open mode for writing Script Log output.

Synopsis

set_log_file (filename, mode)
    

Arguments

filename

The full path to the file to write.

mode

The open mode, which can be one of w, w+, a, or a+. Other characters might be available, depending on the operating system. Please refer to the documentation for the operating system's fopen function.

Returns

t on success, otherwise an error message.

Description

This function sets the file and open mode for writing Script Log output. An open mode of w will overwrite an existing log file, and a will append to an existing log file, or start a new file if none currently exists. If filename is nil then the existing log file is closed and logging to file stops. Logging to file adds some delay when writing large amounts of information to the log.

See also set_log_size and flush_log_file.