The Textlog script command appends text on a new line at the end of a file in the TextLog directory named by the current LogFilename.
Syntax: | Textlog | Expression | Comment | ||
Example: | ![]() |
metric | Append the content of the user value metric to the textlog file | ||
Example: | ![]() |
IP | Append the content of a fixed variable to the textlog file | ||
Example: | ![]() |
"This is a new line" | Append a literal text string to the textlog file | ||
Associated command may be bound to Textlog to set the logfilename | |||||
Example: | ![]() |
LogFilename | = | "water monitor state" | Associated command to set LogFilename |
![]() |
"This is a new line" | Textlog This is a new line to water monitor state | |||
Multiple lines may be written at the same time by a single Textlog by using a variable and New Line commands | |||||
![]() |
TextlogBody | init | |||
Example: | ![]() |
TextlogBody | += | "Added line of text" | Add Line to the variable |
Example: | ![]() |
TextlogBody | += | "Add another line of text" | Add Line to the variable |
![]() |
TextlogBody | specify the variable with the accumulated contents in the Textlog expression | |||
Alternately, multiple lines can be written in a single textlog by using embedded control characters | |||||
![]() |
"line one\r\nline two" | control characters can be embedded in a literal using the escape character '\' |