User Tools

Site Tools


write_to_logs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
write_to_logs [2019/01/09 10:28] – created akuzmukwrite_to_logs [2021/07/23 14:44] – [ERROR(message)] emozolyak
Line 1: Line 1:
  
 ===== Writing to communication log ===== ===== Writing to communication log =====
 +
  
 ==== ERROR(message) ==== ==== ERROR(message) ====
  
-The function adds the **message** with the ERROR level to communication log (**Maintenance -> WebHMI Log**). Function returns 1 if any error occurred and 0 on success.+There are 4 functions for writing to the communication log
 +**INFO, ERROR, DEBUG, TRACE** 
 + 
 +Functions return '1if any error occurred and '0on success. 
 + 
  
 ==== INFO(message) ==== ==== INFO(message) ====
Line 18: Line 24:
 The function adds the **message** with the TRACE level to communication log (**Maintenance -> WebHMI Log**). Function returns 1 if any error occurred and 0 on success. The function adds the **message** with the TRACE level to communication log (**Maintenance -> WebHMI Log**). Function returns 1 if any error occurred and 0 on success.
  
 +==== Customize log output ====
 +
 +You can implement your version of log output function with more complex formatting (e.g. table output or json output), wrapping the basics functions into your Lua code ([[useful_programs#debug_printing |see the example]]).
 ===== Writing to message log ===== ===== Writing to message log =====
  
write_to_logs.txt · Last modified: 2021/07/23 15:06 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki