import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
 * Class to write logs to Rapid7 InsightOps asynchronously
 */
public class AsynchronousLogWriter implements LogWriter {

    private static final int SHUTDOWN_TIMEOUT_SECONDS = 10;

    private final ExecutorService executor;
    private final LogWriter logWriter;

    /**