Package org.apache.logging.log4j.spi

Examples of org.apache.logging.log4j.spi.MutableThreadContextStack


                this.converter.convertToDatabaseColumn(stack));
    }

    @Test
    public void testConvertToDatabaseColumn02() {
        ThreadContext.ContextStack stack = new MutableThreadContextStack(
                Arrays.asList("key1", "value2", "my3"));

        assertEquals("The converted value is not correct.",
                "key1\nvalue2\nmy3",
                this.converter.convertToDatabaseColumn(stack));
View Full Code Here


        final Level level = Level.TRACE;
        final Message data = new SimpleMessage("message");
        final Throwable t = new InternalError("not a real error");
        final Map<String, String> map = new HashMap<String, String>();
        map.put("key", "value");
        final ContextStack contextStack = new MutableThreadContextStack(Arrays.asList("a", "b"));
        final String threadName = "main";
        final StackTraceElement location = null;
        final long currentTimeMillis = 12345;
        evt.setValues(null, loggerName, marker, fqcn, level, data, t, map,
                contextStack, threadName, location, currentTimeMillis);
View Full Code Here

        new SimpleMessage("Test"), new RuntimeException("test"), map, null, "none",
        new StackTraceElement("MapRewritePolicyTest", "setupClass", "MapRewritePolicyTest", 28), 2);
    logEvent1 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ERROR,
        new MapMessage(map), null, map, null, "none",
        new StackTraceElement("MapRewritePolicyTest", "setupClass", "MapRewritePolicyTest", 29), 2);
    final ThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>(map.values()));
    logEvent2 = new Log4jLogEvent("test", MarkerManager.getMarker("test"), "MapRewritePolicyTest.setupClass()",
        Level.TRACE, new StructuredDataMessage("test", "Nothing", "test", map), new RuntimeException("test"), null,
        stack, "none", new StackTraceElement("MapRewritePolicyTest",
        "setupClass", "MapRewritePolicyTest", 30), 20000000);
    logEvent3 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ALL, new MapMessage(map),
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.spi.MutableThreadContextStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.