use of com.canoo.platform.logging.spi.DolphinLoggerBridgeFactory in project dolphin-platform by canoo.
the class DolphinLoggerFactory method configure.
public synchronized void configure(final DolphinLoggerConfiguration configuration) {
Assert.requireNonNull(configuration, "configuration");
bridges.clear();
final Iterator<DolphinLoggerBridgeFactory> iterator = ServiceLoader.load(DolphinLoggerBridgeFactory.class).iterator();
while (iterator.hasNext()) {
final DolphinLoggerBridge bridge = iterator.next().create(configuration);
if (bridge != null) {
bridges.add(bridge);
}
}
markers.clear();
for (final DolphinLogger logger : loggerMap.values()) {
logger.updateBridges(Collections.unmodifiableList(bridges));
final Level level = configuration.getLevelFor(logger.getName());
logger.setLevel(level);
}
this.configuration = configuration;
configured.set(true);
}
Aggregations