Setting the Dgraph log levels

The DGRAPH_LOG_LEVEL property in bdd.conf sets the log levels for the Dgraph log subsystems at start-up time.

If you do not explicitly set the log levels (i.e., if the DGRAPH_LOG_LEVEL property is empty), all subsystems use the NOTIFICATION log level.

The syntax of the property is:
DGRAPH_LOG_LEVEL="subsystem1 level1|subsystem2 level2|subsystemN levelN"
where:
  • subsystem is a Dgraph log subsystem name, as listed in Dgraph out log.
  • level is one of these log levels:
    • INCIDENT_ERROR
    • ERROR
    • WARNING
    • NOTIFICATION
    • NOTIFICATION:16
    • TRACE
    • TRACE:16
    • TRACE:32

The pipe character is required if you are setting more than one subsystem/level combination.

To set the Dgraph log levels:

  1. Modify the DGRAPH_LOG_LEVEL property in bdd.conf to set the required log levels.

    Be sure you modify the bdd.conf version that is in the $BDD_HOME/BDD_manager/conf directory.

  2. Run the bdd-admin script with the publish-config command to update the configuration file of your BDD cluster.

    For details on this command, see publish-config.

  3. Restart the Dgraph by running the bdd-admin script with the restart command.

    For details on this command, see restart.

Keep in mind that you can dynamically change the Dgraph log levels by running the bdd-admin script with the set-log-levels command, as in this example:
./bdd-admin.sh set-log-levels -c dgraph -s eql,task_scheduler -l warning
The new log level may persist into the next Dgraph re-start, depending on whether the command's --non-persistent option is used:
  • If --non-persistent is used, the change will not persist into the next Dgraph re-start, at which time the log levels in the DGRAPH_LOG_LEVEL property are used.
  • If --non-persistent is omitted, the new setting is persisted by being written to the DGRAPH_LOG_LEVEL property in bdd.conf. This means that the next Dgraph re-start will use the changed the log levels in the bdd.conf file.

For details on the set-log-levels command, see set-log-levels.