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: Textlog metric Append the content of the user value metric to the textlog file
Example: Textlog IP Append the content of a fixed variable to the textlog file
Example: Textlog "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: Assign LogFilename = "water monitor state" Associated command to set LogFilename
Textlog "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

New Variable TextlogBody init
Example: Add Line TextlogBody += "Added line of text" Add Line to the variable
Example: Add Line TextlogBody += "Add another line of text" Add Line to the variable
Textlog 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

Textlog "line one\r\nline two" control characters can be embedded in a literal using the escape character '\'

© 2014 ComroeStudios LLC. All Rights Reserved.