ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

  • Overview
  • Implementation
  • Enabling the runtime log
  • Activation in the application directly through programming
  • Activation without modifying the application, via a specific file
  • Tips
  • Viewing the runtime log
  • The information displayed in the window of runtime logs is as follows:
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The runtime log is the best way to identify the most used features of an application. The runtime log is a runtime trace. This log is a simple file (wlog extension) that contains the details of all the operations performed by a user on a WINDEV application, WINDEV Mobile application or WEBDEV site:
  • details about the processes called,
  • WLanguage functions with their parameters,
  • user procedures with their parameters,
  • threads,
  • components.
This file allows you to:
  • find out which operations are the most frequently used in the application.
  • find out which processes take the most time.
  • follow the code run during a process that triggers problems (hard to isolate in test mode).
The development team understands which parts of the application are the most frequently used and can focus its resources on the code to optimize.
Implementation

Enabling the runtime log

The activation of the runtime log can be performed:
  • in the application directly, through programming.
  • WINDEV without modifying the application, via a specific file

Activation in the application directly through programming

This activation is performed by dbgEnableLog. Several WLanguage functions are used to manage the runtime log:
dbgEnableLogEnables the management of the runtime log.
dbgLogOptionAllows you to find out and modify the options of the runtime log.
dbgLogStatusAllows you to find out and modify the status of the runtime log (enabled, disabled, paused).
WINDEV

Activation without modifying the application, via a specific file

To do so, create a file named <Executable Name>.WX beside the executable of the application. This file must contain the following lines:
[LOG]
Active=<0/1>
File=<Name of WXLOG file>
Option=<Value of options>
Let's study these lines:
  • Active: This parameter must correspond to 0 to disable the log and to 1 to enable it.
  • File: Name of the log file ("wlog" extension). This name can be built with the following elements:
    [%ExeDir%]Directory of the executable, always filled with the "\" character. This directory is equivalent to the result of fExeDir.
    [%ExeName%]Name of the executable.
    [%Date%]Start date of Log file.
    [%Time%]Start time of Log file.
    [%UserName%]Name of the current user.
    [%ComputerName%]Name of the computer.
    [%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.
  • Option: Options of the log file.
    • If the options are not specified in the WX file (the OPTION line is missing), the log file is created with the default options: only the WLanguage functions are found in the log file.
    • "" (empty string): Only the processes are stored in the log.
    • "*": the log contains the full information.
    • a combination of values:
      • "+F" to enable the trace for the functions,
      • "+P" to enable the trace for the parameters.

Tips

Depending on the purpose of the runtime log, its implementation as well as the options may change:
  • To find out the most frequently used options of an application, we recommend that you use a simple runtime log (without the details of the functions called). The more options you request, the larger the runtime log will be.
    WINDEV The log can be implemented with the .WX file.
  • To trace a problem that is difficult to reproduce, we recommend that you use the WLanguage functions to implement the runtime log. The runtime log will be enabled at the beginning of the section that is causing problem.
Viewing the runtime log
To view the runtime log in the editor of WINDEV, WEBDEV or WINDEV Mobile:
  • Drag and Drop the ".wlog" file to the window editor (on the bar of opened documents for example).
  • open the ".wlog" file directly.
    Reminder: To open a file from the editor, go to the "Home" tab, "General" group, expand "Open" and select the desired file.
To view the runtime log, the current project in the editor must be the project of the application or the project of one of the components used by the application. Only the information regarding the current project will be displayed.

The information displayed in the window of runtime logs is as follows:

  • The general information about the log file: name, application, start date and time, end date and time.
  • The most frequently used elements: three tabs are displayed:
    • Statistics of elements: Shows the most frequently used elements of your project, with their use time and the number of processes performed. Selecting an element allows you to:
      - see the locations from which an element is used (in the bottom section of the screen)
      - see the elements in the editor ("Show the element" button)
      - access the statistics of the processes ("Process statistics" button).
    • Process statistics: Used to get statistics about the time taken by each process. You can also filter the information about a specific project element.
      The reason for the call is displayed at the bottom of the screen (user action, etc.). The sequence of the call can be viewed for the selected element ("Sequence of calls" button).
      The "Show the process code" button is used to display the corresponding WLanguage code in the code editor. Caution: the window for displaying the logs is always found in the foreground.
    • Sequence of calls: Allows you to view the sequence of processes performed in the selected code. The details of the functions used are displayed.
      Additional information can be displayed at the bottom of the screen: Parameters of the procedure, result, ...
      The "Show the call code" button is used to display the calling code. The "Recenter on process" button is used to view the code of the current process.
  • The calls to procedures and WLanguage functions: Used to see all the calls to the WLanguage procedures and functions.
    Additional information can be displayed at the bottom of the screen: Parameters of the procedure, result, ...
    The "Show the process code" button is used to display the corresponding WLanguage code in the code editor. Caution: the window for displaying the logs is always found in the foreground.
  • The interactions between the threads: Allows you to select the thread that will be taken into account and to see the sequence of calls for each thread.
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment