PC SOFT

WINDEV的在线文档

  • Operating mode of the runtime log
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

调试启用日志 (函数)

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.

18版本和更高版本
WinDevWindows Store apps This function is now available in Windows Store apps mode.
18新版本
WinDevWindows Store apps This function is now available in Windows Store apps mode.
WinDevWindows Store apps This function is now available in Windows Store apps mode.
例子
// Enables the default runtime log
调试启用日志()

语法
<Result> = 调试启用日志([<Name of Log File> [, <Options>]])
<Result>: Boolean
  • 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.
18版本和更高版本
[%DataDir%]
18新版本
[%DataDir%]
[%DataDir%]
Directory of HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of 文件数据库目录.
18版本和更高版本
[%UserDataDir%]
18新版本
[%UserDataDir%]
[%UserDataDir%]
Directory for the data of the current user of the current application. This directory is equivalent to the result of 文件用户数据目录.

By default:
  • 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 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.

The combination 日志.启用 + 日志.W语言功能 is used by default if this parameter is not specified.

注意

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 调试日志选项.
WinDev Note: The runtime log can also be started via the ".wx" file found beside the executable. See Runtime log for more details.

组件
WinDev wd200vm.dll
Linux wd200vm.so