VisualPatch.WriteToLogFile

VisualPatch.WriteToLogFile ( 

string  Text,

boolean AddTimestamp = true )

Example 1

VisualPatch.WriteToLogFile("ERROR: " .. Application.GetLastError(), true);

Outputs the current application error to the patch log file.

Example 2

err = Application.GetLastError();

if err ~= 0 then
    sMessage = "####################\r\n" .. "ERROR " .. err .. ": " .. _tblErrorMessages[err] .. "\r\n####################\r\n";
    VisualPatch.WriteToLogFile(sMessage, false);
end

If an error occurs, outputs a nicely formatted string into the patch log file.

See also:  Related Actions