mirkojotic commented on issue #6580: FileRequestLogger fails when used with 
FilteredRequestLogger
URL: 
https://github.com/apache/incubator-druid/issues/6580#issuecomment-459068032
 
 
   @jon-wei I tried to reproduce this but I couldn't
   
   ```
       ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
   
       String HOST = "localhost";
       ObjectMapper objectMapper = new ObjectMapper();
       DateTime dateTime = DateTimes.nowUtc();
       File logDir = new File("/tmp/druid-logs");
       String nativeQueryLogString = dateTime + "\t" + HOST + "\t" + "native";
   
       FileRequestLogger delegate = new FileRequestLogger(objectMapper, 
scheduler, logDir, "yyyy-MM-dd'.log'");
       FilteredRequestLoggerProvider.FilteredRequestLogger logger = new 
FilteredRequestLoggerProvider.FilteredRequestLogger(
               delegate,
               1000,
               900
       );
       try {
         logger.start();
       } catch (Exception e) {
         e.printStackTrace();
       }
   
       RequestLogLine requestLogLine = RequestLogLine.forSql(
               nativeQueryLogString,
               new HashMap<>(),
               dateTime,
               HOST,
               new QueryStats(ImmutableMap.of("sqlQuery/time", 1000))
       );
   
       logger.logSqlQuery(requestLogLine);
   ```
   
   Is there something I'm missing? It writes to log file I've specified.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to