WriteToSystemLog
This function will write message to system log. Optionally, message priority and additional call stack can be specified
Syntax
WriteToSystemLog("message");
WriteToSystemLog("message","priority");
WriteToSystemLog("message","priority","callStack");
Function arguments
- message – (String) message which will be written to log
- priority – (String) [Optional] priority of log (this can have value equal to 1 or 2)
- callStack – (String) [Optional] call stack which will be written to log
Return value
This function returns Boolean.
Returns true if function was successful, false if there was an error and nothing was written to system log
Examples
Example 1:
This will write words 'Test log message’ to system log.
WriteToSystemLog("Test log message");
Example 2:
This will write words 'Test log message’ to system log and set message priority to 2.
WriteToSystemLog("Test log message","2");
Example 3:
This will write words 'Test log message’ to system log and set message priority to 2 and add 'ExampleStack’ to system log message.
WriteToSystemLog("Test log message","2","ExampleStack");