gianm commented on a change in pull request #6302: Add SQL id, request logs, 
and metrics
URL: https://github.com/apache/incubator-druid/pull/6302#discussion_r246158328
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/log/FileRequestLogger.java
 ##########
 @@ -127,12 +130,22 @@ public void stop()
   }
 
   @Override
-  public void log(RequestLogLine requestLogLine) throws IOException
+  public void logNativeQuery(RequestLogLine requestLogLine) throws IOException
+  {
+    logToFile(requestLogLine.getNativeQueryLine(objectMapper));
+  }
+
+  @Override
+  public void logSqlQuery(RequestLogLine requestLogLine) throws IOException
+  {
+    logToFile(requestLogLine.getSqlQueryLine(objectMapper));
+  }
+
+  private void logToFile(final String message) throws IOException
   {
     synchronized (lock) {
-      fileWriter.write(
-          StringUtils.format("%s%n", requestLogLine.getLine(objectMapper))
 
 Review comment:
   Why replace `%n` with `\n`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to