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

org.mockserver.logging.DelayedFileCreationRollingFileAppender Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
package org.mockserver.logging;

import ch.qos.logback.core.rolling.RollingFileAppender;

/**
 * @author jamesdbloom
 */
public class DelayedFileCreationRollingFileAppender extends RollingFileAppender {

    private boolean fileCreated = false;

    @Override
    public void start() {
        started = true;
    }

    @Override
    protected void subAppend(E event) {
        if (!fileCreated) {
            super.start();
            fileCreated = true;
        }
        super.subAppend(event);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy