tracer = camelContext.getDefaultTracer();
// configure and use any trace formatter if any exists
Map<String, TraceFormatter> formatters = camelContext.getRegistry().lookupByType(TraceFormatter.class);
if (formatters.size() == 1) {
TraceFormatter formatter = formatters.values().iterator().next();
if (tracer instanceof Tracer) {
((Tracer) tracer).setFormatter(formatter);
}
}
}