Automate - Write to log
Declaration
<AMWRITETOLOG LOGLEVEL="text (options)" TEXT="text (message to log)" />
Description
Logs the specified data to the Automate Desktop Event Log. Also supports categorization of log entries, including User Message, Verbose information, Warning and Error.
Practical usage
Frequently used to log a user generated message to the Automate Desktop event log. For example, if a developer wished to convey some important information to the Automate Desktop administrator, they can use this activity to include a message in the log. Automate Desktop Administrators can access the Automate Desktop event log from the Task Administrator by selecting View > Log or clicking the Log button from the toolbar.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Logging level |
Text(options) | Yes | (Empty) |
|
Specifies
how the log entry tat appears in the Automate Desktop Event Log should
be categorized. The available options are:
|
Text to write to log | Text | No | (Empty) | TEXT="Task2 Error" | Specifies the text that should be written to the Automate Desktop Event Log. |
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task writes verbose information to the log.
<AMAUTOMATE ACTIVITY="write_to_log" LOGLEVEL="verbose" TEXT="There was a problem executing the application" />