Changing log levels

You can set the log levels for BDD-related events and for the Dgraph Gateway ZooKeeper client.

Log levels allow you to monitor events of interest at the appropriate granularity without being overwhelmed by messages that are not relevant. When you are initially setting up your application in a development environment, you might want to use the INFO level to get most of the messages, and change to a less verbose level in production.

There are two ways of changing a log level:
  • Manually, by modifying the properties file in a text editor and pushing the configuration using bdd-admin .
  • Dynamically, by using the bdd-admin script set-log-levels command.

To change log levels:

  1. To manually set log levels:
    1. Open the EndecaServerLog4j.properties file.
    2. Locate the line that specfiies the log level for BDD events and set the level as desired:
      log4j.logger.com.endeca=INFO
    3. Locate the line that specfiies the log level for ZooKeeper and set the level as desired:
      log4j.logger.org.apache.zookeeper=INFO
    4. Save and close the file.
    5. Restart WebLogic Server by running the bdd-admin script with the restart command. For example:
      ./bdd-admin.sh restart -c bddServer -n web05.us.example.com
      For information on the restart command, see restart.
  2. To dynamically set log levels:
    Note: This command cannot change the setting of the log4j.logger.org.apache.zookeeper package.
    1. Use the bdd-admin set-log-levels command.

      For additional usage information, see set-log-levels.

      You can also retrieve the current log4j.logger.com.endeca package log level using the bdd-admin get-log-levels command. For usage information, see get-log-levels.