How to setup logging for Rebalance operations
search cancel

How to setup logging for Rebalance operations

book

Article ID: 294406

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

How to setup more logging for Rebalance operations in order to troubleshoot Rebalance related issues.

Environment

Product Version: 9.10

Resolution

For any type of logging to be enabled, we need to ensure that we at least have info level logging enabled like below in gemfire.properties:
log-level=info

For more information, please refer to the following resource: https://gemfire.docs.pivotal.io/910/geode/managing/logging/setting_up_logging.html
To set up more logging for rebalance, we need to set the following System Property:
gemfire.LOG_REBALANCE=true

This flag is defined as below in the GemFire code:
private final boolean DEBUG =
      Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "LOG_REBALANCE");

And with the help of this variable, debug level logs are configured for rebalance as shown in the below code and will help troubleshooting rebalance related issues:
private void debug(String message, Object... params) {
  if (logger.isDebugEnabled()) {
    logger.debug(message, params);
  } else if (logger.isInfoEnabled() && DEBUG) {
    logger.info(message, params);
  }