« Back to Product

Documentation

IPS_LogMessage

 bool IPS_LogMessage (string $Sender, string $Message) 

Parameters

Sender

The displayed sender of the message

Message

The message to be displayed

Returns

If the function succeeds, it returns TRUE, otherwise FALSE.

Description

The function writes the message Message with the sender Sender into the IP-Symcon log file. The string Sender should indicate the originator of the message, e.g., the name of the script. The message can be observed live in the message window as "Custom Message".

Example

$ScriptStart = microtime(true);
// calculate a lot...
$ScriptRuntime = microtime(true) - $ScriptStart;
IPS_LogMessage($_IPS['SELF'], "Runtime is ". $ScriptRuntime. "sec");
Any questions?