reporters = Maps.newHashMap();
REGISTRIES.put(registry, reporters);
}
Slf4jReporter reporter = reporters.get(logger);
if (reporter == null) {
Builder reporterBuilder = Slf4jReporter.forRegistry(registry)
.filter(filter)
.convertDurationsTo(defaultDurationUnit)
.convertRatesTo(defaultRateUnit)
.outputTo(LoggerFactory.getLogger(logger));
if (marker != null) {
reporterBuilder = reporterBuilder.markWith(new BasicMarkerFactory().getMarker(marker));
}
reporter = reporterBuilder.build();
reporter.start(frequency, TimeUnit.NANOSECONDS);
reporters.put(logger, reporter);
}
}
}