Difference between revisions of "Function log()"

From wiki.netio-products.com
Jump to navigation Jump to search
(Parameters)
Line 5: Line 5:
  
 
=== Parameters ===
 
=== Parameters ===
<i>string</i> <code>message</code> will be inserted into the event log. Can display socket properties using ${property} syntax - see the example below.
+
<i>string</i> <code>message</code>
 +
Will be inserted into the event log. Can display socket properties using ${property} syntax - see the example below.
  
 
=== Return value ===
 
=== Return value ===

Revision as of 22:14, 19 April 2017

Insert a record into the socket's event log. Suitable for debugging purposes.

nil log(message)

Parameters

string message

Will be inserted into the event log. Can display socket properties using ${property} syntax - see the example below.

Return value

nil

Usage

-- prints i.e. 'The power of outlet 1 is 17 Watts.'
log("The power of outlet 1 is ${devices.system.output1_consumption} Watts.")

See also

  • logf() to display formatted string