in timer-log/src/main/java/org/acme/timer/log/ExchangeFormatterProducer.java [51:67]
public ExchangeFormatter exchangeFormatter() {
return new ExchangeFormatter() {
@Override
public String format(Exchange exchange) {
String toEndpoint = exchange.getProperty(Exchange.TO_ENDPOINT, String.class);
String body = exchange.getMessage().getBody(String.class);
switch (toEndpoint) {
case "log://timer":
return LogColor.BLUE.apply("Java DSL: " + body);
case "log://timer-xml":
return LogColor.YELLOW.apply("XML DSL: " + body);
default:
return body;
}
}
};
}