All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.logging.core.BufferedLogger Maven / Gradle / Ivy

There is a newer version: 4.29.2
Show newest version
package liquibase.logging.core;

import liquibase.logging.LogMessageFilter;

import java.util.logging.Level;

public class BufferedLogger extends AbstractLogger {

    private BufferedLogService bufferedLogService;
    private Class clazz;

    public BufferedLogger(Class clazz, BufferedLogService bufferedLogService, LogMessageFilter filter) {
        super(filter);
        this.clazz = clazz;
        this.bufferedLogService = bufferedLogService;
    }

    @Override
    public void log(Level level, String message, Throwable e) {
        if (level == Level.OFF) {
            return;
        }

        this.bufferedLogService.addLog(new BufferedLogService.BufferedLogMessage(level, clazz, filterMessage(message), e));
    }

    @Override
    public void close() throws Exception {

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy