Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);
Long groupInterval = getAndRemoveParameter(parameters, "groupInterval", Long.class);
CamelLogger logger;
if (groupSize != null) {
logger = new ThroughputLogger(remaining, level, groupSize);
} else if (groupInterval != null) {
Boolean groupActiveOnly = getAndRemoveParameter(parameters, "groupActiveOnly", Boolean.class, Boolean.TRUE);
Long groupDelay = getAndRemoveParameter(parameters, "groupDelay", Long.class);
logger = new ThroughputLogger(this.getCamelContext(), remaining, level, groupInterval, groupDelay, groupActiveOnly);
} else {
LogFormatter formatter = new LogFormatter();
IntrospectionSupport.setProperties(formatter, parameters);
logger = new CamelLogger(remaining);