Write to Log

 

Declaration

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

See Also

Call Function | Stop Task | Write to Log | Enable/Disable Task | Shut Down AutoMate | Start Task | Trigger Task | Backup AutoMate

Description

Logs the specified data to the AutoMate Event Log. Also supports categorization of log entries, including User Message, Verbose information, Warning and Error. Logs will appear in the AutoMate Event Log.

Practical Usage

Frequently used to log a user generated message to the AutoMate event log. For example, if a developer wished to convey some important information to the AutoMate administrator, he/she can use this action to include a message in the log. AutoMate Administrators can access the AutoMate event log from the Task Administrator by selecting View -> Log or clicking the Log button from the toolbar. More on AutoMate Event Log

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

Logging Level

Text

(options)

Yes

(Empty)

LOGLEVEL="verbose" 

Specifies how the log entry should be categorized in the AutoMate Event Log. 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 Log.

Description Properties

The Description tab allows you to customize the text description of any step when it appears in the Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab is part of AutoMate's Error Handling functionality which allows you to select / omit specific errors that will cause a particular step to fail.

More about error causes properties

On Error Properties

The On Error tab is part of AutoMate's Error Handling functionality which allows you to determine what the task should do if a particular step encounters an error.

More about on error properties

Additional Notes

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Write verbose information "There was a problem executing the application" to log.  

<AMWRITETOLOG LOGLEVEL="verbose" TEXT="There was a problem executing the application" />

↑ Top of Page