com.mzt.logapi.context.LogRecordContext Maven / Gradle / Ivy
package com.mzt.logapi.context;
import com.google.common.collect.Maps;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
/**
* @author muzhantong
* create on 2021/2/9 2:22 下午
*/
public class LogRecordContext {
private static final InheritableThreadLocal>> variableMapStack = new InheritableThreadLocal<>();
public static void putVariable(String name, Object value) {
if (variableMapStack.get() == null) {
Stack