public ExchangeFormatter exchangeFormatter()

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-yaml":
                    return LogColor.YELLOW.apply("YAML DSL: " + body);
                default:
                    return body;
                }
            }
        };
    }