- Operating mode of the runtime log
- Miscellaneous
dbgEnableLog (Function) In french: dbgActiveLog Enables the runtime log through programming. Remark: 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: - on the "Home" tab, in the "General" group, expand "Open", select "Open" and select the desired ".wlog" file.
- by performing a Drag and Drop of the ".wlog" file from the file explorer to the editor.
// Enables the default runtime log dbgEnableLog()
Syntax
<Result> = dbgEnableLog([<Log file> [, <Options>]])
<Result>: Boolean - True if the runtime log was started,
- False otherwise.
<Log file>: Optional character string Location and name of the log file to create. The name and location of the log file can be: - fully customized.
- built using the following keywords:
| | [%ExeDir%] | Directory of the 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 the current user. | [%ComputerName%] | Computer name. | [%DataDir%] | Directory of the HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of fDataDir. | [%DirUserData%] | Directory for the data of the current user of the current application. This directory is equivalent to the result of fDataDirUser. |
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".Caution: If you use the dynamic string construction ("Allow "[% %]" in the strings" in the "Compilation" tab of the 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: | | LogAll | The runtime log retrieves:- the WLanguage functions
- the parameters of the functions
- the processes
| LogEnabled | The runtime log is immediately enabled. | LogParameters | The parameters of the functions are written into the runtime log. | LogPause | The runtime log is not immediately enabled | LogProcessOnly | The runtime log only retrieves information about the processes. | LogWLanguageFunctions | The WLanguage functions are written into the runtime log. |
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 only once. 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.
Miscellaneous - dbgEnableLog can be used in a REST webservice.
- You can define any location for the log file. In this case, keep in mind there may be permission-related issues.
Reminder: Generally, the data directory is accessible in write mode.
This page is also available for…
|
|
|
|