Returns the current Log string or the specified Log string type string.
[ sLog = ] GetLogString ([enLogStringType=aLogStringDefault] )
The GetLogString procedure syntax has the following parts:
Name |
Type |
Description |
sLog |
BString |
Current Log string or specified Log string type string |
enLogStringType |
Log String Type (ATEasy v5) |
enumALogStringType can be one of the following values:
Name |
Value |
Description |
aLogStringDefault |
0 |
Default current log string |
aLogStringTestResult |
0x1 |
When inside a test, Test result row log string |
aLogStringTestTable |
0x2 |
When inside a test, Test header row log string |
aLogStringTests |
0x4 |
When inside a Program, all Tests results and headers log string in the current Task |
aLogStringTaskHeader |
0x8 |
When inside a Task, current Task header log string |
aLogStringTask |
0x10 |
All Tests results with Task header log string |
aLogStringTasks |
0x20 |
All Tasks/Tests log string |
aLogStringProgramHeader |
0x40 |
Program header (OnInitProgram) log string |
aLogStringProgramEnd |
0x80 |
Program end footer (OnEndProgram) log string |
aLogStringAppHeader |
0x100 |
Application header (OnInit/OnInitSystem) log string |
aLogStringAppend (v.6) |
0x200 |
Append statements log string |
aLogStringFailuresOnly |
0x10000000 |
Failures Only mode log string |
aLogStringUseIdeFailuresOnly |
0x20000000 |
Application all Failures Only log string |
aLogStringIgnoreTestStatusNone |
0x40000000 |
Returns an empty string if TestStatus is None, otherwise returns the current log string |
aLogStringCalcTestStatus |
0x80000000 |
Force recalculate Test Status based on TestResult. Does not effect TestStatus for Other test type. |
aLogStringSetLogString |
0x1000000 |
Returns the log string as set by SetLogString function and clears that string |
aLogStringLeaveSetLogString |
0x2000000 |
Returns the log string as set by SetLogString function and leaves that string |
The current Log string can be retrieved only while ATEasy
is executing Event procedures The function is used to retrieve the current
Log string in order to customize the Log output.
From: |
The Function Returns : |
OnInitProgram |
The serial number and the start time. |
OnInitTask |
The task header. |
OnInitTest |
The test header. |
OnEndTest |
The test header if test type changed and the test log/result line (MIN/MAX, RESULT, etc.). |
OnEndProgram |
The stopped time, elapsed time, UUT status. |
The optional parameter, enLogStringType is only available in ATEasy 5.0 and beyond.
The following example uses the GetLogString to print test results without the Pin Field.
OnEndTest()
{
SetLogOff()
s=GetLogString() ! s is defined as string[512]
i=Pos("Pin ", s)
If (i > 0)
s=Mid(s, 0, i)+Right(s, i+6) ! remove pin
i=Pos(" ------ ", s)
s=Mid(s, 0, i)+Right(s, i+6) ! remove ----
Endif
i=Pos("-\r\n", s)
s=Mid(s, 0, i+26)+Right(s, I+32) ! remove name
Print s ! print the Log
}
OnInitTask()
{
SetLogOn() ! enable Log output
}
OnEndTask()
{
SetLogOn() ! enable Log output
}
OnEndProgram()
{
SetLogOn() ! enable Log output
}
FormatLogString, SetLogOff, SetLogOn, SetLogStringT, estResult Variable, TestStatus Variable