Print

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");
Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
How Can We Improve This Article?