// so if a child is set then use it, if not then its the original output used
ProcessorDefinition<?> targetOutputDef = childDefinition != null ? childDefinition : outputDefinition;
LOG.debug("Initialize channel for target: '{}'", targetOutputDef);
// first wrap the output with the managed strategy if any
InterceptStrategy managed = routeContext.getManagedInterceptStrategy();
if (managed != null) {
next = target == nextProcessor ? null : nextProcessor;
target = managed.wrapProcessorInInterceptors(routeContext.getCamelContext(), targetOutputDef, target, next);
}
// then wrap the output with the tracer
TraceInterceptor trace = (TraceInterceptor) getOrCreateTracer().wrapProcessorInInterceptors(routeContext.getCamelContext(), targetOutputDef, target, null);
// trace interceptor need to have a reference to route context so we at runtime can enable/disable tracing on-the-fly