use of liquibase.logging.core.DefaultLogger in project liquibase by liquibase.
the class LogFactory method getLog.
public Logger getLog(String name) {
if (!loggers.containsKey(name)) {
Logger value;
try {
ServiceLocator serviceLocator = ServiceLocator.getInstance();
if (serviceLocator == null) {
//ServiceLocator not yet running
return defaultLogger;
}
value = (Logger) serviceLocator.newInstance(Logger.class);
} catch (Exception e) {
return defaultLogger;
}
value.setName(name);
if (defaultLoggingLevel != null) {
value.setLogLevel(defaultLoggingLevel);
}
loggers.put(name, value);
}
return loggers.get(name);
}
Aggregations