@Before public void setUp() throws Exception { System.clearProperty(AsyncQueueFullPolicyFactory.PROPERTY_NAME_ASYNC_EVENT_ROUTER); System.clearProperty(AsyncQueueFullPolicyFactory.PROPERTY_NAME_DISCARDING_THRESHOLD_LEVEL); PropertiesUtil.getProperties().reload(); }
void init() { System.clearProperty("log4j2.threadContextMap"); final String PACKAGE = "org.apache.logging.log4j.spi."; System.setProperty("log4j2.threadContextMap", PACKAGE + implClassSimpleName()); PropertiesUtil.getProperties().reload(); ThreadContextTestAccess.init(); }
private void prepareThreadContext(boolean isThreadContextMapInheritable) { System.setProperty("log4j2.isThreadContextMapInheritable", Boolean.toString(isThreadContextMapInheritable)); PropertiesUtil.getProperties().reload(); ThreadContextTest.reinitThreadContext(); ThreadContext.remove("baz"); ThreadContext.put("foo", "bar"); }