Use the Log text to file
action in the Logging
package to create a log file that records events when a Task Bot
runs.
Procedure
Follow these steps to log text into a file:
-
In the Actions palette, double-click or drag the Log text
to file
action from the Logging
package.
-
In the File path field, specify the file location or
variable.
-
In the Enter text to log field, enter the text to log in the
file.
-
Select the Append timestamp check box to add a
timestamp.
Note: This action does not support setting
datetime format for the appended timestamp.
-
In the When logging field, select Append to
existing log file to append the log file or Overwrite
existing log file to overwrite the content in the log file.
-
Select the Encoding type.
- ANSI: Used to encode Latin
alphabet.
- UNICODE: Supports multilingual text
encoding.
- UTF8: Can encode all possible
characters.
- UTF-16LE: Inserts
a byte order mark (BOM) Unicode character at the beginning of the file.
Note: Shift-JIS files must use ANSI
as encoding to read text file content.
If you selected the Append to existing log file option in
previous step (Step 5), ensure that the selected encoding matches the encoding of the
original file. Mismatched encoding might cause characters to be lost or
corrupted.
-
Click Save.
The Task Bot creates or updates the specified
log file each time it runs, appending or overwriting content based on the option you
selected.