|
|
|
|
|
- Operating mode of the runtime log
- Miscellaneous
dbgEnableLog (Function) In french: dbgActiveLog Enables the runtime log programmatically. Remark: Starting with version 28, the runtime log contains a ".wxl" file, a ".ndx" file and a ".mmo" file. 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 then select the desired ".wxl" file.
- drag the ".wxl" file from the file explorer and drop it onto the editor.
For more details, see Runtime log.Note: In previous versions, the runtime log was a ".wlog" file. Syntax
<Result> = dbgEnableLog([<Log file> [, <Options> [, <delay before recycling>]]])
<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 build strings dynamically ("Allow '[% %]' in the strings" option in the "Compilation" tab of the project description, a compilation error appears (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableLog("[%RepDonneesUtilisateur%][%NomExe%]_[%Date%]_[%Heure%]")
becomesdbgEnableLog(-%"[%RepDonneesUtilisateur%][%NomExe%]_[%Date%]_[%Heure%]")
<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
- 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. <delay before recycling>: Optional duration delay (in seconds) before deleting old log information to limit file size. If this parameter is not specified, old log information is not deleted.. 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 web service.
- 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|