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

io.polaris.core.log.Log4j2Stack Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package io.polaris.core.log;

import org.apache.logging.log4j.ThreadContext;

/**
 * @author Qt
 * @since  Aug 04, 2023
 */
class Log4j2Stack implements IStack {

	@Override
	public void put(String key, String val) {
		ThreadContext.put(key, val);
	}

	@Override
	public String get(String key) {
		return ThreadContext.get(key);
	}

	@Override
	public void remove(String key) {
		ThreadContext.remove(key);
	}

	@Override
	public void clear() {
		ThreadContext.clearAll();
	}

	@Override
	public void push(String msg) {
		ThreadContext.push(msg);
	}

	@Override
	public String pop() {
		return ThreadContext.pop();
	}

	@Override
	public String peek() {
		return ThreadContext.peek();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy