17.2. Changing Data Grid Server logging configuration at runtime


Modify the logging configuration for Data Grid Server at runtime to temporarily adjust logging to troubleshoot issues and perform root cause analysis.

Modifying the logging configuration through the CLI is a runtime-only operation, which means that changes:

  • Are not saved to the log4j2.xml file. Restarting server nodes or the entire cluster resets the logging configuration to the default properties in the log4j2.xml file.
  • Apply only to the nodes in the cluster when you invoke the CLI. Nodes that join the cluster after you change the logging configuration use the default properties.

Procedure

  1. Create a CLI connection to Data Grid Server.
  2. Use the logging to make the required adjustments.

    • List all appenders defined on the server:

      logging list-appenders

      The command provides a JSON response such as the following:

      {
        "STDOUT" : {
          "name" : "STDOUT"
        },
        "JSON-FILE" : {
          "name" : "JSON-FILE"
        },
        "HR-ACCESS-FILE" : {
          "name" : "HR-ACCESS-FILE"
        },
        "FILE" : {
          "name" : "FILE"
        },
        "REST-ACCESS-FILE" : {
          "name" : "REST-ACCESS-FILE"
        }
      }
    • List all logger configurations defined on the server:

      logging list-loggers

      The command provides a JSON response such as the following:

      [ {
        "name" : "",
        "level" : "INFO",
        "appenders" : [ "STDOUT", "FILE" ]
      }, {
        "name" : "org.infinispan.HOTROD_ACCESS_LOG",
        "level" : "INFO",
        "appenders" : [ "HR-ACCESS-FILE" ]
      }, {
        "name" : "com.arjuna",
        "level" : "WARN",
        "appenders" : [ ]
      }, {
        "name" : "org.infinispan.REST_ACCESS_LOG",
        "level" : "INFO",
        "appenders" : [ "REST-ACCESS-FILE" ]
      } ]
    • Add and modify logger configurations with the set subcommand

      For example, the following command sets the logging level for the org.infinispan package to DEBUG:

      logging set --level=DEBUG org.infinispan
    • Remove existing logger configurations with the remove subcommand.

      For example, the following command removes the org.infinispan logger configuration, which means the root configuration is used instead:

      logging remove org.infinispan

17.2.1. Access logging

The command also allows for enabling access logs during runtime to analyze issues. You can enable the access logging for a specific endpoint and utilize the CLI command to parse those files to generate server-side metrics. This technique is useful in identifying whether latency is an issue from the connection between client and server or intra-cluster.

The workflow for this analysis involves a few steps:

  1. Enable access logging with the CLI for the endpoint you are analyzing.

    logging set --level=TRACE org.infinispan.RESP_ACCESS_LOG

    In this example, enabling the access log for the RESP endpoint.

  2. Run the tests to reproduce the issue or workload to measure.
  3. Disable access logging with the CLI.

    logging set --level=INFO org.infinispan.RESP_ACCESS_LOG
  4. Download the access log files.

    The server report command is also capable of downloading the log files.

With the access log files available, you can utilize the CLI command to analyze the server’s behavior more deeply. The CLI command provides information about long-running commands, segmentation per client, and operations.

Categories

Data Grid provides an access log for each endpoint available on the server. You can edit the logging level to enable each endpoint individually. The loggers available for each endpoint are:

  • org.infinispan.HOTROD_ACCESS_LOG: Enables the access log for the Hot Rod endpoint.
  • org.infinispan.REST_ACCESS_LOG: Enables the access log for the REST endpoint.
  • org.infinispan.MEMCACHED_ACCESS_LOG: Enables the access log for the Memcached endpoint.
  • org.infinispan.RESP_ACCESS_LOG: Enables the access log for the RESP endpoint.

Observe that each logger can be activated individually and independently of the others.

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る