Working with RQMAgent logs

To configure the RQMAgent logs, update the RQMAgent logging properties file.

The logs that are referred to here are associated with the execution of the RQMAgent application.
  1. In the home installation directory of HCL OneTest API, locate rqmagent-logging.properties.
  2. Open rqmagent-logging.properties in a text editor.
  3. Configure the logging handlers:
    You can have RQMAgent write the logs to a console, to a file, or to both. Locate the property that configures the type of logging to use and update it as needed. For example,
    handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler

    By default, both console logging and file logging are enabled for RQMAgent.

    By default, the log files for RQMAgent are output to the logs directory that is under the home installation directory of HCL OneTest API installation.
    Note: The naming convention of the log files has changed over the releases. Starting from version 9.2.0, the RQMAgent log file is called rqmagent*.log.
  4. Set the log level:
    The following properties in rqmagent-logging.properties define the log level:
    • java.util.logging.ConsoleHandler.level: The maximum level of message that can be output to the console. Messages with a lower priority than this level are not displayed on the console.
    • java.util.logging.FileHandler.level: The maximum level of message that can be output to the log file. Messages with a lower priority than this level are not included in the log file.
    • product_packages.level: The level at which messages that are output from the corresponding packages are generated. It is typical for all packages to be set at the same level.
    Set the properties to any of the following built-in log levels: SEVERE (to show the least amount of details on worst error conditions only), WARNING, INFO, CONFIG, FINE, FINER, FINEST (to display every message with more detail, most of which are not errors).
    Warning: Log levels associated with lower severity such as FINER and FINEST output large amounts of data to the logs, which might make your debugging process difficult. Therefore, do not use them unless necessary.
    Example: In this example, both console logging and file logging are enabled. Both of these logging components are configured to allow the FINEST level of details. However, the RQMAgent product packages are restricted to export messages to the logging components at the SEVERE, WARNING, INFO levels only.
    
    #------------------------------- TYPE OF LOGGING ------------------------------
    handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler
    #---------------------------- DEFAULT LOGGING LEVEL --------------------------- 
    .level = INFO
    #------------------------------- FILE LOGGING ---------------------------------
    java.util.logging.FileHandler.level = FINEST
    java.util.logging.FileHandler.limit = 5000000
    java.util.logging.FileHandler.count = 2
    java.util.logging.FileHandler.pattern = %b/logs/rqmagent-%u-%g.log
    #---------------------------- AGENT CONSOLE LOGGING ---------------------------
    java.util.logging.ConsoleHandler.level = FINEST
    #------------------------------ PACKAGE LOG LEVELS ----------------------------
    product_packages.level = INFO
    
  5. For any changes you made to the logging configuration to take effect, restart the RQMAgent.

Viewing the log output on the console

  1. In the HCL OneTest API installation directory, locate RQMAgent.exe (on Windows computers) or RQMAgent executable (on non-Windows computers).
  2. Open a command prompt and run the executable file with the -console option. This action fetches the console messages into the command window.
Note: Only one instance of the RQMAgent can be active at a time. Therefore, before running the executable from the command line, close any previously running instance of the RQMAgent.

Optional: Setting the log file location and patterns

Locate the property in rqmagent-logging.properties that defines the log file patterns and update it as needed. For example, java.util.logging.FileHandler.pattern = %b/logs/rqmagent-%u-%g.log. For information about what each substitution variable (for example, %b) represents, see the comments in rqmagent-logging.properties.

Optional: Changing the name and location of the logging properties file

Change the name and location of the logging properties files as follows:
  1. In the home installation directory of HCL OneTest API, locate the RQMAgent.ini file.
  2. Open RQMAgent.ini in a text editor.
  3. Locate the property that defines the logging properties file (-Djava.util.logging.config.file) and update the value as required. For example:
    -Djava.util.logging.config.file=./C:/myfolder/logs/rqmAgentLog.properties