Working with HTTP/TCP proxy logs

To configure the HTTP/TCP proxy logs, update the proxy logging properties file.

  1. In the httptcp directory under the home installation directory of HCL Quality Server, locate proxy-logging.properties.
  2. Open proxy-logging.properties in a text editor.
  3. Configure the logging handlers:
    You can have HTTP/TCP proxy 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 the HTTP/TCP proxy.

    The log files for the HTTP/TCP proxy are written to the /httptcp/logs directory that is under the home installation directory of HCL Quality Server. On Windows computers, all users have modify permissions to the logs directory by default. You can modify the directory permissions to restrict the access as required after the installation.
    Note: The naming convention of the log files has changed over the releases. Starting from version 9.2.0 the HTTP/TCP proxy log file is called proxy*.log.
  4. Set the log level:
    Use the following properties in proxy-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, the HTTP/TCP Proxy is configured to provide both console and file logging. Console logging is configured to log SEVERE, WARNING, and INFO messages. File logging is configured to log all possible messages, including the FINEST details. The proxy product packages are configured to export messages for most product classes to the logging components down to the INFO level of details. However, for the com.predic8.membrane classes, logging messages will be exported with the FINEST level of details.
    
    #------------------------------- TYPE OF LOGGING ------------------------------
    handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
    #---------------------------- DEFAULT LOGGING LEVEL --------------------------- 
    .level = INFO
    #------------------------------ CONSOLE LOGGING -------------------------------
    java.util.logging.ConsoleHandler.level = INFO
    #------------------------------- FILE LOGGING ---------------------------------
    java.util.logging.FileHandler.level = FINEST
    java.util.logging.FileHandler.pattern = %b/logs/proxy-%u-%g.log
    java.util.logging.FileHandler.limit = 5000000
    java.util.logging.FileHandler.count = 10
    #------------------------------ PACKAGE LOG LEVELS ----------------------------
    product_packages.level = INFO
    com.predic8.membrane.level = FINEST
    
  5. For any changes that you made to the logging configuration to take effect, restart the HTTP/TCP proxy.

Optional: Setting the log file location and patterns

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