Titan



log


The log statement provides the means to write a character string to some logging device associated with test control or the test component in which the statement is used.


log ( " free_text_string " [,constanst_ref] [,variable_ref] [,template_ref] [,expression] );

TITAN specific extensions to the standard:

  • constanst_ref refers to a constant. The value of the constant appears in the log file.

  • variable_ref refers to a variable. The actual value of the variable is copied to the log file.

  • template_ref refers to a template. The log file will contain the actual field values of the referred template.

  • expression denotes a predefined or user-defined TTCN-3 function. Functions with actual arguments can also be passed to log statement. This will print the return value of the function into the log. The match operation is an exception: instead of the Boolean return value the detailed matching process is logged field-by-field.


Example 1:

log ("Note the following value: ", rnd(float .217))

The text between quotation marks will be added to the log file followed by the a random value generated using the seed 0.217.


BNF definition of log