@Test public void shouldAddLogProcessorWithCustomMessageAndStepId() { final Step step = new Step.Builder().id("step-id") .putConfiguredProperty("customText", "Log me baby one more time").build(); assertThat(handler.handle(step, route, NOT_USED, "1", "2")).contains(route); verify(route).log(LoggingLevel.INFO, (String) null, "step-id", "Log me baby one more time"); }
@Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { final String message = createMessage(step); if (message.isEmpty()) { return Optional.empty(); } if (step.getId().isPresent()) { String stepId = step.getId().get(); return Optional.of(route.log(LoggingLevel.INFO, (String) null, stepId, message)); } return Optional.of(route.log(LoggingLevel.INFO, message)); }
LogStepHandler implements IntegrationStepHandler { @Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { final String message = createMessage(step); if (message.isEmpty()) { return Optional.empty(); } if (step.getId().isPresent()) { String stepId = step.getId().get(); return Optional.of(route.log(LoggingLevel.INFO, (String) null, stepId, message)); } return Optional.of(route.log(LoggingLevel.INFO, message)); } }
LogStepHandler implements IntegrationStepHandler { @Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { final String message = createMessage(step); if (message.isEmpty()) { return Optional.empty(); } if (step.getId().isPresent()) { String stepId = step.getId().get(); return Optional.of(route.log(LoggingLevel.INFO, (String) null, stepId, message)); } return Optional.of(route.log(LoggingLevel.INFO, message)); }  }
LogStepHandler implements IntegrationStepHandler { @Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { final String message = createMessage(step); if (message.isEmpty()) { return Optional.empty(); } if (step.getId().isPresent()) { String stepId = step.getId().get(); return Optional.of(route.log(LoggingLevel.INFO, (String) null, stepId, message)); } return Optional.of(route.log(LoggingLevel.INFO, message)); }  @Override boolean canHandle(Step step); @Override Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex); }
LogStepHandler implements IntegrationStepHandler { @Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { final String message = createMessage(step); if (message.isEmpty()) { return Optional.empty(); } if (step.getId().isPresent()) { String stepId = step.getId().get(); return Optional.of(route.log(LoggingLevel.INFO, (String) null, stepId, message)); } return Optional.of(route.log(LoggingLevel.INFO, message)); }  @Override boolean canHandle(Step step); @Override Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex);  }