|
4 | 4 | import net.jpountz.xxhash.StreamingXXHash64;
|
5 | 5 | import net.jpountz.xxhash.XXHashFactory;
|
6 | 6 | import org.aksw.iguana.cc.config.elements.ConnectionConfig;
|
| 7 | +import org.aksw.iguana.cc.controller.MainController; |
7 | 8 | import org.aksw.iguana.cc.query.handler.QueryHandler;
|
8 | 9 | import org.aksw.iguana.cc.utils.http.RequestFactory;
|
9 | 10 | import org.aksw.iguana.cc.worker.ResponseBodyProcessor;
|
@@ -468,10 +469,12 @@ private static HttpExecutionResult createFailedResultDuringResponse(
|
468 | 469 |
|
469 | 470 | private void logExecution(ExecutionStats execution) {
|
470 | 471 | switch (execution.endState()) {
|
471 |
| - case SUCCESS -> LOGGER.debug("{}\t:: Successfully executed query: [queryID={}].", this, execution.queryID()); |
| 472 | + case SUCCESS -> { |
| 473 | + if (MainController.Args.logSuccess) LOGGER.info("{}\t:: Successfully executed query: [queryID={}, duration={}].", this, execution.queryID(), execution.duration()); |
| 474 | + } |
472 | 475 | case TIMEOUT -> LOGGER.warn("{}\t:: Timeout during query execution: [queryID={}, duration={}].", this, execution.queryID(), execution.duration()); // TODO: look for a possibility to add the query string for better logging
|
473 | 476 | case HTTP_ERROR -> LOGGER.warn("{}\t:: HTTP Error occurred during query execution: [queryID={}, httpError={}].", this, execution.queryID(), execution.httpStatusCode().orElse(-1));
|
474 |
| - case MISCELLANEOUS_EXCEPTION -> LOGGER.warn("{}\t:: Miscellaneous exception occurred during query execution: [queryID={}, exception={}].", this, execution.queryID(), execution.error().orElse(null)); |
| 477 | + case MISCELLANEOUS_EXCEPTION -> LOGGER.warn("{}\t:: Miscellaneous exception occurred during query execution: [queryID={}].", this, execution.queryID(), execution.error().orElse(null)); |
475 | 478 | }
|
476 | 479 | }
|
477 | 480 |
|
|
0 commit comments