AppendToLogFileWithLimit()
Summary
Appends text to the log file while respecting a message limit.
Changes
Added to Version 4.8.
Syntax
AppendToLogFileWithLimit(int IndentLevel, string text)
| Argument | Contents |
|---|---|
| IndentLevel | The indentation level of the text |
| text | The text of the message to append |
Notes
-
The indentation levels are five spaces each.
-
When the limit to the number of messages is reached, the message "Additional unlisted errors present (too numerous to list)" is written to the log file, and additional calls to AppendToLogFileWithLimit() will not add any more messages to the log file.
Example
SetLogFileName("c:\\temp\\logfile.txt")
AppendToLogFile(0, "Starting list of messages")
SetLogMessageLimit(25)
// Only the first 25 messages will be appended
for i=1 to 50 do
AppendToLogFileWithLimit(1, "Message #" + String(i))
end
// This message will be appended
AppendToLogFile(0, "Ending list of messages")
See Also
| Function | Summary |
|---|---|
| AppendToLogFile() | Appends text to the log file |
| GetLogFileName() | Gets the name of the log file |
| ResetLogFile() | Empties the log file |