package pl.polgrabia.demos;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PluginRunner {
    private static final Logger logger = LoggerFactory.getLogger(PluginRunner.class);
    private final PluginRunnerConfig config;

    /**
     * Create plugin with the given config
     * @param config plugin runner config to create with
     */
    public PluginRunner(PluginRunnerConfig config) {
        this.config = config;
    }

    public static void main(String[] args) {
        new PluginRunner(new PluginRunnerConfig("1", "2"))
                .execute();
    }

    /**
     * Execute plugin runner
     */
    public void execute() {
        logger.info("Started runner id: {}, name: {}", config.id(), config.name());
    }
}
