class SplunkAppenderFactory extends AbstractAppenderFactory<ILoggingEvent> {

    @Override
    public Appender<ILoggingEvent> build(LoggerContext context, String applicationName, LayoutFactory<ILoggingEvent> layoutFactory, LevelFilterFactory<ILoggingEvent> levelFilterFactory, AsyncAppenderFactory<ILoggingEvent> asyncAppenderFactory) {
        HttpEventCollectorLogbackAppender<ILoggingEvent> appender = new HttpEventCollectorLogbackAppender<>();
        checkNotNull(context);

        appender.setUrl(url);
        appender.setToken(token);
        appender.setSource(source);
        appender.setSourcetype(sourceType);
        appender.setIndex(index);
        appender.setbatch_size_count(batchSizeCount.toString());
        appender.setLayout(buildLayout(context, layoutFactory));
        appender.addFilter(levelFilterFactory.build(threshold));
        appender.setHttpProxyHost(System.getProperty("http.proxyHost"));
        appender.setHttpProxyPort(getProxyPortIntFromSystem());
        appender.start();

        return wrapAsync(appender, asyncAppenderFactory, context);
    }

}