package com.r11.tools.utilis;

import java.util.Map;
import org.slf4j.MDC;

/**
 * This static class has one purpose and one purpose only. It logs data about incomming requests.
 * The data from logs is received via {@link com.release11.klaus.repository.EventRepositoryImpl}
 * @author Rafał Żukowski
 */
public final class TrackingClient {

    /**
     * Logs data inside the given map
     * @param businessKeysMap map containing all the information about incomming request
     */
    public static void setBusinessKeys(Map<BusinessKey, String> businessKeysMap){
        for (Map.Entry<BusinessKey, String> entry : businessKeysMap.entrySet()) {
            MDC.put(entry.getKey().getReasonPhrase(), entry.getValue());
        }
    }


}
