SetLogString Procedure

Version 5

Sets and enables the next log string.

Syntax

SetLogString ([sLog], [bOn=True] )

The SetLogString procedure syntax has the following parts:

 

Name

Type

Description

sLog

BString

Next log string. If the value of second parameter, bOn is True, and this string is not empty, then  sLog  will be stored, else an empty string will be stored.

bOn

Bool

Optional. State flag - on or off.  When True, sLog will be used for the next log string. When False, sLog will be ignored and the next log string will be generated by ATEasy.

Comments

Use this procedure to set the next log string used by ATEasy. Setting the log string inside a test will cause ATEasy to output the string after the OnEndTest or event is called by ATEasy.

This procedure works with GetLogString():  use SetLogString() sets the next log string, with the next call to GetLogString(), you can retrieve the string.  You can also ignore this feature by using the second state flag, False.

This procedure is useful when the user wishes to change the log string created by ATEasy providing different information or format to the test log.

Example

The following example uses the SetLogString to print some descriptions about tests:

 

!in a test called 'SetLogString' code

s=" Test Number = "+ Test.Number + " Name = '"+test.name+"' Test Status = "+"PASS"

SetLogString(s)

 

! the following will output to test log

Test Number = 7.15 Name = 'SetLogString' Test Status = PASS

 

See Also

GetLogString, FormatLogString, SetLogOff, SetLogOn