This article aims to address these requirements:
1. How to run an Engine Trace from within X3 generally
The Engine Tracing functionality changed significantly in 2021 R3 (Version 12 Patch 27). See the attached PDFs for more details on both the pre-V12 P27 and V12 P27+ methods of setting up Engine Tracing.
See the attached PDF files for more information:
2. How to run an Engine Trace interactively from within a function
You can manually enable and disable logging interactively following these steps:
3. How to run/initiate an Engine Trace from within your 4GL code
Within your code, you are going to enter something similar to:
Local Integer RETTRACERETTRACE =openlog('TRA',5) **NOTE: Entering flag of "5" is just an example. Enter whatever flag is appropriate for your requirements# The code you want to traceRETTRACE=CloseLog()
Note: TRA represents the folder that the log file will be written to. The value corresponds to the flag as defined in the Online help for Engine trace.
You can also refer to the presentation materials "Introduction to tracing classic functions" included in "Index page: Sage X3 Technical Support Tips and Tricks (March 2021)" and "Deep dive into the engine trace log file" included in "Index page: Sage X3 Technical Support Tips and Tricks (October 2022)"