@gaodayue @jon-wei re: 
https://github.com/apache/incubator-druid/pull/6302#discussion_r221352359,

I am thinking it will be best to have a single RequestLogger interface with 
methods like `logNativeQuery` and `logSqlQuery`. There are three main reasons:

1. It is just as flexible as having multiple interfaces. Imagine a 
"MultiRequestLogger" that can route different types of logs to different 
underlying loggers (SQL to kafka, native to file; or different files, etc). 
Sort of like the "composing" emitter we have.
2. It is more powerful, in that it can do one thing that the multiple 
interfaces cannot: it can write different types of logs to the same file.
3. Last but not least: it is simpler for users that are just getting started. 
They set up request logging one time, and all request logs go to the same place 
(of course, there should be a `logType` field that allows users to understand 
what is being logged). We could even extend this in the future to add exception 
logging and other sorts of structured logging (as opposed to log4j, which we 
use for _unstructured_ logging).

[ Full content available at: 
https://github.com/apache/incubator-druid/pull/6302 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to