Difference between revisions of "Function log()"

From wiki.netio-products.com
Jump to navigation Jump to search
(Založena nová stránka s textem „{{DISPLAYTITLE:function log()}} Insert a record into the socket's event log. Suitable for debugging purposes. <i>nil</i> log(<u>message</u>) === Paramet…“)
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
Insert a record into the socket's event log. Suitable for debugging purposes.
 
Insert a record into the socket's event log. Suitable for debugging purposes.
  
  <i>nil</i> log(<u>message</u>)
+
  <i>nil</i> <b>log</b>(<i>string</i> <code>message</code>)
  
 
=== Parameters ===
 
=== Parameters ===
<i>string</i> <u>message</u> 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 ===
Line 13: Line 13:
 
  -- prints i.e. 'The power of outlet 1 is 17 Watts.'
 
  -- prints i.e. 'The power of outlet 1 is 17 Watts.'
 
  log("The power of outlet 1 is ${devices.system.output1_consumption} Watts.")
 
  log("The power of outlet 1 is ${devices.system.output1_consumption} Watts.")
 +
 +
=== See also ===
 +
* [[Function logf()|logf()]] to display formatted string
  
 
__NOTOC__
 
__NOTOC__

Latest revision as of 18:21, 5 May 2017

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

nil log(string 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