Search in sources :

Example 1 with DolphinLoggerConfiguration

use of com.canoo.platform.logging.DolphinLoggerConfiguration in project dolphin-platform by canoo.

the class DolphinLoggerFactory method getLogger.

@Override
public synchronized Logger getLogger(final String name) {
    if (!configured.get()) {
        configure(new DolphinLoggerConfiguration());
    }
    final DolphinLogger logger = this.loggerMap.get(name);
    if (logger != null) {
        return logger;
    } else {
        final Level loggerLevel = configuration.getLevelFor(name);
        final DolphinLogger newInstance = new DolphinLogger(this, name, bridges, loggerLevel);
        final DolphinLogger oldInstance = this.loggerMap.putIfAbsent(name, newInstance);
        return oldInstance == null ? newInstance : oldInstance;
    }
}
Also used : Level(org.slf4j.event.Level) DolphinLoggerConfiguration(com.canoo.platform.logging.DolphinLoggerConfiguration)

Aggregations

DolphinLoggerConfiguration (com.canoo.platform.logging.DolphinLoggerConfiguration)1 Level (org.slf4j.event.Level)1