set-log-levels

The set-log-levels command sets component log levels and updates their configuration files so that the changes persist when the components are restarted.

To set component log levels, run the following from the Admin Server:
./bdd-admin.sh set-log-levels [option <arg>]

set-log-levels supports the following options.

Option Description
-c, --component <component(s)> A comma-separated list of the components to run on:
  • dgraph: Dgraph
  • dp: Data Processing
  • gateway: Dgraph Gateway
-s, --subsystem <subsystem(s)> A comma-separated list of the Dgraph out log subsystems to run on:
  • background_merging
  • bulk_ingest
  • cluster
  • datalayer
  • dgraph (Note that this is different from the dgraph component.)
  • eql
  • eql_feature
  • eve
  • http
  • lexer
  • splitting
  • ssl
  • task_scheduler
  • text_search_rel_rank
  • text_search_spelling
  • update
  • workload_manager
  • ws_request
  • xq_web_service

This option can only be specified when running on the dgraph component. If the script runs on the dgraph component and this option isn't specified, it runs on all supported subsystems.

Note: When setting the levels of Dgraph log subsystems, the script also updates the DGRAPH_LOG_LEVELS property in bdd.conf accordingly. When setting log levels on specific nodes, it only updates bdd.conf on those nodes. These settings will be overwritten if the publish-config command is run.

For more information on the Dgraph out log and its subsystems, see Dgraph out log.

-l, --level <level> The log level to set for the components:
  • INCIDENT_ERROR
  • ERROR
  • WARNING
  • NOTIFICATION
  • NOTIFICATION:16 (Dgraph only)
  • TRACE
  • TRACE:16 (Dgraph only)
  • TRACE:32 (Dgraph only)

Only one log level can be specified. If this option is omitted, the script sets all specified logs to NOTIFICATION.

Note that the NOTIFICATION:16, TRACE:16, and TRACE:32 log levels are only supported by the dgraph component.

--non-persistent Indicates that the log levels should be reset when the components are restarted. When specified, the script doesn't update the component configuration files.

This option is only available for the dgraph and gateway components. Data Processing log levels are always persistent.

-n, --node <hostname(s)> A comma-separated list of the nodes to run on. Each must be defined in bdd.conf.

If no options are specified, the script sets the log levels of all supported components and Dgraph log subsystems to NOTIFICATION. These settings will persist if the components are restarted.

Examples

The following command sets the log levels of Data Processing and the Dgraph log subsystems cluster and datalayer to WARNING:
./bdd-admin.sh set-log-levels -c dgraph,dp -s cluster,datalayer -l WARNING
The following command sets the log levels of the Dgraph Gateway and all Dgraph subsystems to ERROR, which will not be persistent:
./bdd-admin.sh set-log-levels -c dgraph,gateway -l ERROR --non-persistent