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

org.whitesource.utils.logger.LogMapDefiner Maven / Gradle / Ivy

package org.whitesource.utils.logger;

import ch.qos.logback.core.PropertyDefinerBase;
import org.whitesource.utils.Constants;

import java.util.HashMap;
import java.util.Map;

public class LogMapDefiner extends PropertyDefinerBase {

    /* --- Static members --- */
    private static Map properties = new HashMap<>();
    protected static final String APPENDER_NAME = "appenderName";
    protected static final String LOGGER_NAME = "loggerName";

    static {
        properties.put(APPENDER_NAME, Constants.MAP_APPENDER_NAME);
        properties.put(LOGGER_NAME, Constants.MAP_LOG_NAME);
    }

    private String propertyLookupKey;

    /* --- Getters / Setters --- */

    public void setPropertyLookupKey(String propertyLookupKey) {
        this.propertyLookupKey = propertyLookupKey;
    }

    @Override
    public String getPropertyValue() {
        return properties.get(propertyLookupKey);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy