Skip to main content

Log variables to file

Write one name=value line per variable to a log file, to record the state of a run; credentials are written as ****.

Command in the Log to file toolkit · id ooa.log/log_variables · 8 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
PathFileYesLog file path, e.g. logs/state.log.
VariablesDictionaryNoNames and values to write, e.g. {"invoice": "$invoice", "total": "$total"}; may be empty when all_of_type is set.
TitleStringNoHeading line written before the variables.
TimestampBooleanNotrueStart the heading with the date and time.
OverwriteBooleanNofalseReplace the file instead of appending.
EncodingStringNoutf-8File encoding: utf-8, utf-16le (Unicode, written with a byte-order mark) or ansi (the runner's code page). Match the existing file when appending.
Timestamp formatStringNoPattern for the date and time; ISO 8601 with time zone when empty.
All of typeStringNoAlso write every variable of the bot declared with this type (all = every variable), in declaration order, after the ones listed in variables. Credentials are written as ****.

Outputs​

OutputTypeWhat it is
linesNumberNumber of variable lines written.