SetLogOption Function

Action

Specifies whether to generate log files (.log), and if so, which kind of information to write to the files. Log files contain information about timers, transactions performed by a user, and function calls invoked by the transactions. A separate log file is generated for each virtual user.

注: This function overrides the settings in the General tab of the Profile Settings - Results dialog.

Include file

Kernel.bdh

Syntax

SetLogOption( in nOption : number );
Parameter Description
nOption

Logging option. If this parameter is set to 0, no log files are generated. Otherwise, if any combination of the following flags is passed to the function, a separate log file for each virtual user is generated.

  • OPT_LOG_ALL. Include all available types of information

  • OPT_LOG_TRANSACTIONS. Include an overview of all transactions a user performs

  • OPT_LOG_TIMERS. Include information of automatic and custom timers

  • OPT_LOG_APICALLS. Include an overview of all Silk Performer API calls a user performs

  • OPT_LOG_INFORMATIONAL. Include additional information, for example, connection information

  • OPT_LOG_DATA. Include data exchanged with the server

  • OPT_LOG_NONPRINTABLECHAR. Display in the log file all nonprintable characters as dots.

Example

dcltrans
  transaction TInit
  begin
    // include in the log file all transaction and
    // API function calls a user performs
    SetLogOption(OPT_LOG_TRANSACTIONS | OPT_LOG_APICALLS);
  end TInit;