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

com.gc.craftsman.logstash.logback.trace.LogTraceContext Maven / Gradle / Ivy

package com.gc.craftsman.logstash.logback.trace;

import com.gc.craftsman.logstash.logback.thread.RequestScopeContext;
import net.logstash.logback.encoder.org.apache.commons.lang.StringUtils;

import java.util.Map;

/**
 * Created by cjw on 23/09/2017.
 */
public class LogTraceContext {

    private static RequestScopeContext context = RequestScopeContext.getInstance();

    public static boolean markTraceData(String traceKey, String traceValue) {
        if (StringUtils.isNotBlank(traceKey) && StringUtils.isNotBlank(traceValue)) {
            context.put(traceKey, traceValue);
            return true;
        }

        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy