mirror of https://github.com/apache/druid.git
make request logs machine-readable
This commit is contained in:
parent
552b365194
commit
21d648cc39
|
@ -93,7 +93,7 @@ public class QueryServlet extends HttpServlet
|
|||
query = objectMapper.readValue(requestQuery, Query.class);
|
||||
|
||||
requestLogger.log(
|
||||
new RequestLogLine(new DateTime(), req.getRemoteAddr(), query)
|
||||
new RequestLogLine(new DateTime(), req.getRemoteAddr(), jsonMapper.writer().writeValueAsString(query))
|
||||
);
|
||||
|
||||
Sequence<?> results = query.run(texasRanger);
|
||||
|
|
|
@ -31,9 +31,9 @@ public class RequestLogLine
|
|||
|
||||
private final DateTime timestamp;
|
||||
private final String remoteAddr;
|
||||
private final Query query;
|
||||
private final String query;
|
||||
|
||||
public RequestLogLine(DateTime timestamp, String remoteAddr, Query query)
|
||||
public RequestLogLine(DateTime timestamp, String remoteAddr, String query)
|
||||
{
|
||||
this.timestamp = timestamp;
|
||||
this.remoteAddr = remoteAddr;
|
||||
|
@ -50,4 +50,4 @@ public class RequestLogLine
|
|||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue