By default, Druid does not enable log query.

In other words, data queried in Druid does not show up in Druid’s logs, and one of the problems with this is that there is no way for Druid to get queries in the background.

This article focuses on showing query logs in logs.

configuration

Druid log to use slf4j, so you need to modify the properties file for: common. Runtime. Properties

This file is located at the Druid deployment path:

/conf/druid/_common/common.runtime.properties

In the configuration file above, add a property:

druid.request.logging.type=slf4j

Configuration log4j2. XML

The log4j2.xml log configuration file is in the same path as the Druid deployment.

The main change here is the log level. Most of the time you may set the log level to ERROR. The output of the query log is in the log level INFO.

Therefore, you need to change your Root log level to INFO. If you are not familiar with log levels, please refer to the log4j2 configuration.

After completing the above configuration, restart the Druid service you deployed and you should be able to see what the query request is.

At the end of the log you should be able to see what the specific query SQL is, and in Druid you can also use JSON format for queries.

www.ossez.com/t/druid/136…