Automate - Write to log

Declaration

<AMWRITETOLOG LOGLEVEL="text (options)" TEXT="text (message to log)" />

Related Topics   

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)
  • LOGLEVEL="message"
  • LOGLEVEL="verbose" 
  • LOGLEVEL="warning"
  • LOGLEVEL="error"
Specifies how the log entry tat appears in the Automate Desktop Event Log should be categorized. The available options are:
  • User message (default) - The log entry will be categorized as a user message.
  • Verbose information - The log entry will be categorized as a verbose message.
  • Warning - The log entry will be categorized as a warning message.
  • Error - The log entry will be categorized as an error message.
Text to write to log Text No (Empty) TEXT="Task2 Error" Specifies the text that should be written to the Automate Desktop Event Log.

Description

Error Causes

On Error

Example

NOTE:
  • 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.

Copy
<AMAUTOMATE ACTIVITY="write_to_log" LOGLEVEL="verbose" TEXT="There was a problem executing the application" />