liquibase.logging.core.CompositeLogger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-core Show documentation
Show all versions of liquibase-core Show documentation
Liquibase is a tool for managing and executing database changes.
package liquibase.logging.core;
import liquibase.logging.LogMessageFilter;
import liquibase.logging.Logger;
import java.util.List;
import java.util.logging.Level;
public class CompositeLogger extends AbstractLogger {
private final List loggers;
/**
* @deprecated use {@link #CompositeLogger(List)}
*/
public CompositeLogger(List loggers, LogMessageFilter filter) {
this(loggers);
}
public CompositeLogger(List loggers) {
this.loggers = loggers;
}
@Override
public void close() throws Exception {
for (Logger logger : loggers) {
logger.close();
}
}
@Override
public void log(Level level, String message, Throwable e) {
if (level == Level.OFF) {
return;
}
for (Logger logger : loggers) {
logger.log(level, message, e);
}
}
}