Enables the runtime log by programming.
Note: The runtime log is a ".wlog" file containing all the codes corresponding to the actions performed by the user. If the project corresponding to the runtime log is opened in the editor, the log file can be directly opened in the editor:
- via "File .. Open" and by selecting the requested ".wlog" file.on the "首页" pane, in the "常规" group, expand "Open", select "Open" and select the requested ".wlog" file.
- by performing a Drag and Drop of the ".wlog" file from the file explorer to the editor.
This function is now available in Windows Store apps mode.
// Enables the default runtime log
<Result> = 调试启用日志([<Name of Log File> [, <Options>]])
- 真 if the runtime log was started,
- 假 otherwise.
<Name of Log File>: Optional character string
Location and name of the log file to create. The name of the log file can contain the following elements:
|[%ExeDir%]||Directory of the executable, always filled with the "\" character. This directory is equivalent to the result of 文件可执行文件目录.|
|[%ExeName%]||Name of the executable.|
|[%Date%]||Start date of the runtime log (YYYYMMDD format).|
|[%Time%]||Start time of the runtime log (HHMMSS format).|
|[%UserName%]||Name of the current user.|
|[%ComputerName%]||Name of the computer.|
|Directory of HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of 文件数据库目录.|
|Directory for the data of the current user of the current application. This directory is equivalent to the result of 文件用户数据目录.|
- before version 180062: the name of the Log file corresponds to: "[%ExeDir%][%ExeName%]_[%Date%]_[%Time%]".
For example: "C:\MyApp\Myapp_20071023_130812.wlog".
- from version 180062: the name of the Log file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
For example: "C:\Users\Doc\AppData\Roaming\WinDev Applications\MyApp\MyApp_20071023_130812.wlog".
<Options>: Optional Integer constant (or combination of constants)
Used to configure the options of the runtime log:
The combination 日志.启用 + 日志.W语言功能 is used by default if this parameter is not specified.
|日志.启用||The runtime log is immediately enabled.|
|日志.W语言功能||The WLanguage functions are written into the runtime log.|
|日志.参数||The parameters of the functions are written into the runtime log.|
|日志.暂停||The runtime log is not immediately enabled|
|日志.全部||The runtime log retrieves:|
- the WLanguage functions
- the parameters of the functions
- the processes
|日志.唯一处理||The runtime log only retrieves the information about the processes.|
Operating mode of the runtime log
- 调试启用日志 must be called once only. Any other call to this function will have no effect.
- To temporarily enable or disable the runtime log, use 调试日志状态.
- To modify the options of the runtime log, use 调试日志选项.
Note: The runtime log can also be started via the ".wx" file found beside the executable. See Runtime log
for more details.