write_to_logs
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
write_to_logs [2019/01/09 10:28] – created akuzmuk | write_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 | + | There are 4 functions for writing to the communication log: |
+ | **INFO, ERROR, DEBUG, TRACE** | ||
+ | |||
+ | Functions return '1' | ||
+ | |||
==== 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# | ||
===== Writing to message log ===== | ===== Writing to message log ===== | ||
write_to_logs.txt · Last modified: 2021/07/23 15:06 by emozolyak