Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »


FUNCTION xpxTrace (traceFunction                                : INTEGER;
                   declarationsToLog, sourceLinesToLog, logFile : STRING;
                   maxLogFileSize, options                      : INTEGER)
                   status                                       : INTEGER;

The xpxTrace function generates a log according to the filter specified by options. All 6 arguments must be present when <traceFunction> = XPXDEFINE_TRACE. For other values of <traceFunction>, only one argument is required, and if specified the additional 5 arguments will not be checked. Hence xpxTrace can be called with 6 to 1 arguments. XPXDEFINE_TRACE cannot be performed ( error code is returned) when a "trace condition" is already defined. Terminating current "program" in EDMexpressVM  or invoking xpxTrace with XPXCLOSE_TRACE will "clear current trace condition". The EDMsupervisor  "log/trace" specification in Data>ConvertModels ..etc, and Aux>LogExpression>Define will define a "trace condition". Hence in such cases the actual "program" must execute a xpxTrace with XPXCLOSE_TRACE before a new "trace condition" can be specified by invoking xpxTrace with XPXDEFINE_TRACE. XPXSTART_TRACE, XPXSTOP_TRACE "works as for edmiTrace operations"


NOTE: xpxTrace has been updated after original text was submitted. Dependent on invocation mode, behavior may differ unexpectedly, hence e "new" explanation valid for edmcore v602.211.97 onwards is proposed:

The xpxTrace function generates a log according to the filter specified by options. All 6 arguments must be present when <traceFunction> = XPXDEFINE_TRACE. For other values of <traceFunction>, only one argument is required, and if specified the additional 5 arguments will not be checked. Hence xpxTrace can be called with 6 to 1 arguments. Within an "XPX program" a trace condition is regarded as active as soon as xpxTrace(XPXDEFINE_TRACE) is called, and remains active until xpxTrace(XPXCLOSE_TRACE) is called, or the XPX program terminates. The trace condition can also be set by parameters to the XPX program invocation, see for example edmiRemoteExecuteQuery

If a trace is active, you may modify current trace condition to a certain extent:

  • (proposal): If XPXDEFINE_TRACE is applied and trace is active. the following arguments can be changed:  declarationsToLog, sourceLinesToLog, options (subset). Still, the original condition will be restored upon return to calling program

An XPX program in this context is one of the following:

  • Execution of a SCHEMA_MAP
  • Execution of a VALIDATION
  • Execution of a QUERY

When invoking another XPX program from an XPX program, for example by calling xpxExecuteQueryBN() from within another query, the new XPX program inherits the current trace condition.  Such program is called an XPX Child Program. Redefining the trace condition is possible by using XPXCLOSE_TRACE and XPXDEFINE_TRACE. Following rules apply

  • If XPXCLOSE_TRACE is applied within a child program, trace is paused, but will be reinvoked with same condition upon returning to calling program
  • If XPXCLOSE_TRACE and then XPXDEFINE_TRACE is applied within a child program, a new trace condition will be applied until XPXCLOSE_TRACE or return to calling program. Upon return the trace condition ahead of the call will be reactivated
  • (proposal): If XPXDEFINE_TRACE is applied and trace is active. the following arguments can be changed:  declarationsToLog, sourceLinesToLog, options (subset). Still, the original condition will be restored upon return to calling program

Any call to XPXDEFINE_TRACE when a "trace condition" is already active with prohibited parameter changes will give an error return and no change in condition.

ENDNOTE: I am dependent on feedback on this paragraph, hence I have deliberately made a couple of mistakes...(smile)

Arguments


TypeNameComment
INTEGERtraceFunctionOne of the following values: XPXDEFINE_TRACE,XPXSTART_TRACE, XPXSTOP_TRACE, XPXCLOSE_TRACE.
STRINGdeclarationsToLogSpecifies the Express-X declarations that should be executed when logging should be performed Legal Express-X declarations are: Map, Compose, Statements and Rule. An Express-X declaration can be specified by the name, i.e., map name, function name, etc., or by the line number in the source schema where the actual declaration is declared. The names of the Express-X declarations are case insensitive. Any number of declarations can be specified. White space and comma can be used as delimiter between each declaration in this argument. The order of the declarations in the input field is insignificant. This argument and the <sourceLinesToLog> argument specifies that only the parts of the schema defined by these arguments should be logged, otherwise the complete schema would be logged when logging is enabled.
STRINGsourceLinesToLogSpecifies the Express-X source line intervals that should be logged during the conversion process. A source line interval is specified either as the name of a declaration of type: map, compose, statements, function and procedure, or by a single line number or by the first line number and the last line number separated by the hyphen '-' character. Any number of intervals can be specified, the intervals are separated by a comma. The order of the intervals is not significant. Example: ?10, 20-30, 2000 - 2200, 99, Man2Woman? This argument and the <declarationsToLog> argument specifies that only the parts of the Express-X schema defined by these arguments should be logged, otherwise the complete schema would be logged when logging is enabled.
STRINGlogFilePath to the log file.
INTEGERmaxLogFileSizeMax size of log file in bytes. Relevant only when the XPXRING_FILE    option is set.
INTEGERoptionssee below, Options should be set to 0 (zero) when no options are wanted.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_XPX_Return_Value'.

Options


OptionComment
XPXFULL_LOGcomment
XPXLOG_AGGREGATE_CONTENTS
XPXLOG_ASSIGNMENTS
XPXLOG_CONDITIONS
XPXLOG_ERRORS
XPXLOG_FUNCTIONS
XPXLOG_EXPRESSIONS
XPXLOG_INSTANCE_CREATION
XPXLOG_IMPLICIT_CREATION
XPXLOG_PREDEF_FUNCTIONS
XPXLOG_ITERATIONS
XPXLOG_TO_STDOUT
XPXLOG_TO_FILE
XPXRING_FILE
XPXLOG_WARNINGS
XPXUSER_OUTPUT_TO_STDOUT
XPXUSER_OUTPUT_TO_FILE


Example


<Missing Example>


See also

Filter by label

There are no items with the selected labels at this time.


  • No labels