package com.beolnix.marvin.plugins.api;

import com.beolnix.marvin.config.api.model.Property;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;

/**
 * Created by beolnix on 06/02/16.
 */
public class PluginConfig {
    private final Logger logger;
    private final File pluginDir;
    private final Map<String, String> propMap = new HashMap<>();

    public PluginConfig(Logger logger, File pluginDir, List<Property> properties) {
        this.logger = logger;
        this.pluginDir = pluginDir;

        properties.forEach(p -> propMap.put(p.getName(), p.getValue()));
    }

    public Logger getLogger() {
        return logger;
    }

    public File getPluginDir() {
        return pluginDir;
    }

    public String getPropertyByName(String name) {
        return propMap.get(name);
    }
}

@@ -302,29 +302,34 @@
 e final 
-Logger logger
+String logsDirPath
 ;%0A    pr
@@ -450,21 +450,26 @@
 fig(
-Logger logger
+String logsDirPath
 , Fi
@@ -531,20 +531,30 @@
 .log
-ger = logger
+sDirPath = logsDirPath
 ;%0A  
@@ -683,24 +683,29 @@
 lic 
-Logger
+String
  getLog
-ger
+sDirPath
 () %7B
@@ -723,19 +723,24 @@
 turn log
-ger
+sDirPath
 ;%0A    %7D%0A

replace Logger with logsDirPath in PluginConfig