diff --git a/contribs/src/main/java/com/netflix/conductor/contribs/http/GenericHttpTask.java b/contribs/src/main/java/com/netflix/conductor/contribs/http/GenericHttpTask.java index 63e1fb0fc7..c1dd062c2e 100644 --- a/contribs/src/main/java/com/netflix/conductor/contribs/http/GenericHttpTask.java +++ b/contribs/src/main/java/com/netflix/conductor/contribs/http/GenericHttpTask.java @@ -191,7 +191,7 @@ HttpResponse httpCall(Input input, Task task, Workflow workflow, WorkflowExecuto response.headers = cr.getHeaders(); return response; } catch (UniformInterfaceException ex) { - logger.error(ex.getMessage(), ex); + logger.error("HTTP task failed for workflowId{}, taskId {}, taskRefname {}, url {}, errorMessage {}", workflow.getWorkflowId(), task.getTaskId(), task.getReferenceTaskName(), input.getUri(), ex.getMessage()); ClientResponse cr = ex.getResponse(); logger.error("Status Code: {}", cr.getStatus()); if (cr.getStatus() > 199 && cr.getStatus() < 300) { @@ -204,11 +204,10 @@ HttpResponse httpCall(Input input, Task task, Workflow workflow, WorkflowExecuto return response; } else { String reason = cr.getEntity(String.class); - logger.error(reason, ex); throw new Exception(reason); } } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error("HTTP task failed for workflowId{}, taskId {}, taskRefname {}, url {}, errorMessage {}", workflow.getWorkflowId(), task.getTaskId(), task.getReferenceTaskName(), input.getUri(), ex.getMessage()); response.body = null; response.headers = null; response.statusCode = -1; diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowSweeper.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowSweeper.java index 076fec2d81..b70c2d4b86 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowSweeper.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowSweeper.java @@ -115,7 +115,9 @@ public void sweep(List workflowIds, WorkflowExecutor executor) throws Ex Future future = es.submit(() -> { NDC.push("sweep-" + UUID.randomUUID().toString()); - logger.debug("Calling decider from sweeper for workflow {}", workflowId); + if (logger.isDebugEnabled()) { + logger.debug("Calling decider from sweeper for workflow {}", workflowId); + } try { WorkflowContext ctx = new WorkflowContext(config.getAppId());