PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode of the runtime log
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
dbgEnableLog (Function)
In French: dbgActiveLog
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 "Home" pane, in the "General" 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.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 19
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Enables the default runtime log
dbgEnableLog()
Syntax
<Result> = dbgEnableLog([<Name of Log File> [, <Options>]])
<Result>: Boolean
  • True if the runtime log was started,
  • False otherwise.
<Name of Log File>: Optional character string
Location and name of the log file to create. The name of the log file can be built from the following elements:
[%ExeDir%]Directory of executable, always filled with the "\" character. This directory is equivalent to the result of fExeDir.
[%ExeName%]Executable name.
[%Date%]Start date of runtime log (YYYYMMDD format).
[%Time%]Start time of runtime log (HHMMSS format).
[%UserName%]Name of current user.
[%ComputerName%]Computer name.
Versions 18 and later
[%DataDir%]
New in version 18
[%DataDir%]
[%DataDir%]
Directory of HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of fDataDir.
Versions 18 and later
[%DirUserData%]
New in version 18
[%DirUserData%]
[%DirUserData%]
Directory for the data of the current user of the current application. This directory is equivalent to the result of fDataDirUser.
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".
By default, 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".
Versions 22 and later
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableLog("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableLog(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
New in version 22
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableLog("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableLog(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableLog("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableLog(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
<Options>: Optional Integer constant (or combination of constants)
Used to configure the options of the runtime log:
LogEnabledThe runtime log is immediately enabled.
LogWLanguageFunctionsThe WLanguage functions are written into the runtime log.
LogParametersThe parameters of the functions are written into the runtime log.
LogPauseThe runtime log is not immediately enabled
LogAllThe runtime log retrieves:
  • the WLanguage functions
  • the parameters of the functions
  • the processes
LogProcessOnlyThe runtime log only retrieves information about the processes.
The combination LogEnabled + LogWLanguageFunctions is used by default if this parameter is not specified.
Remarks

Operating mode of the runtime log

  • dbgEnableLog must be called once only. Any other call to this function will have no effect.
  • To temporarily enable or disable the runtime log, use dbgLogStatus.
  • To modify the options of the runtime log, use dbgLogOption.
WINDEVWindows Mobile Note: The runtime log can also be started via the ".wx" file found beside the executable. See Runtime log for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment