Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java Tue Oct 25 07:41:10 2011 @@ -33,7 +33,7 @@ import java.util.Map; /** * */ -@Plugin(name="ThreadContextMap", type="Core", elementType="filter") +@Plugin(name="ThreadContextMapFilter", type="Core", elementType="filter", printObject = true) public class ThreadContextMapFilter extends FilterBase { private final Map<String, Object> map; @@ -84,6 +84,24 @@ public class ThreadContextMapFilter exte return match ? onMatch : onMismatch; } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("isAnd=").append(isAnd); + if (map.size() > 0) { + sb.append(", {"); + boolean first = true; + for (Map.Entry<String, Object> entry : map.entrySet()) { + if (!first) { + sb.append(", "); + } + first = false; + sb.append(entry.getKey()).append("=").append(entry.getValue()); + } + sb.append("}"); + } + return sb.toString(); + } + @PluginFactory public static ThreadContextMapFilter createFilter(@PluginElement("pairs") KeyValuePair[] pairs, @PluginAttr("operator") String oper,
Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java Tue Oct 25 07:41:10 2011 @@ -33,7 +33,7 @@ import org.apache.logging.log4j.message. * * The default Level is ERROR. */ -@Plugin(name="Threshold", type="Core", elementType="filter") +@Plugin(name="ThresholdFilter", type="Core", elementType="filter", printObject=true) public class ThresholdFilter extends FilterBase { private static final String LEVEL = "level"; @@ -66,6 +66,10 @@ public class ThresholdFilter extends Fil return level.isAtLeastAsSpecificAs(this.level) ? onMatch : onMismatch; } + public String toString() { + return level.toString(); + } + @PluginFactory public static ThresholdFilter createFilter(@PluginAttr("level") String loggerLevel, @PluginAttr("onMatch") String match, Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/TimeFilter.java Tue Oct 25 07:41:10 2011 @@ -34,7 +34,7 @@ import java.util.TimeZone; /** * Filters events that fall within a specified time period in each day. */ -@Plugin(name="Time", type="Core", elementType="filter") +@Plugin(name="TimeFilter", type="Core", elementType="filter", printObject = true) public class TimeFilter extends FilterBase { /** * Starting offset from midnight in milliseconds. @@ -87,6 +87,14 @@ public class TimeFilter extends FilterBa return (apparentOffset >= start && apparentOffset < end) ? onMatch : onMismatch; } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("start=").append(start); + sb.append(", end=").append(end); + sb.append(", timezone=").append(timezone.toString()); + return sb.toString(); + } + @PluginFactory public static TimeFilter createFilter(@PluginAttr("start") String start, @PluginAttr("end") String end, Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java Tue Oct 25 07:41:10 2011 @@ -530,7 +530,7 @@ public class PatternLayout extends Abstr } public String toString() { - return "PatternLayout(" + conversionPattern + ")"; + return conversionPattern; } @PluginFactory Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/Log4J-V2.0.xsd URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/Log4J-V2.0.xsd?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/Log4J-V2.0.xsd (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/Log4J-V2.0.xsd Tue Oct 25 07:41:10 2011 @@ -4,7 +4,10 @@ <xs:complexType name="configurationType"> <xs:sequence> <xs:element type="propertiesType" name="properties"/> - <xs:element type="filtersType" name="filters"/> + <xs:choice minOccurs="0" maxOccurs="1"> + <xs:element type="filtersType" name="filters"/> + <xs:element type="filterType" name="filter"/> + </xs:choice> <xs:element type="appendersType" name="appenders"/> <xs:element type="loggersType" name="loggers"/> </xs:sequence> @@ -21,7 +24,10 @@ <xs:complexType name="appenderType"> <xs:sequence> <xs:element type="layoutType" name="layout" minOccurs="0"/> - <xs:element type="filtersType" name="filters" minOccurs="0"/> + <xs:choice minOccurs="0" maxOccurs="1"> + <xs:element type="filtersType" name="filters"/> + <xs:element type="filterType" name="filter"/> + </xs:choice> </xs:sequence> <xs:attribute type="xs:string" name="type" use="required"/> <xs:attribute type="xs:string" name="name" use="required"/> @@ -62,7 +68,10 @@ </xs:complexType> <xs:complexType name="loggerType"> <xs:sequence> - <xs:element type="filtersType" name="filters" minOccurs="0"/> + <xs:choice minOccurs="0" maxOccurs="1"> + <xs:element type="filtersType" name="filters"/> + <xs:element type="filterType" name="filter"/> + </xs:choice> <xs:element type="appender-refType" name="appender-ref"/> </xs:sequence> <xs:attribute type="xs:string" name="name" use="required"/> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java Tue Oct 25 07:41:10 2011 @@ -174,7 +174,7 @@ public class FileAppenderTest { Matcher matcher = pattern.matcher(str); assertTrue("Bad data: " + str, matcher.matches()); } - assertTrue("Incorrect count: was " + counter + " should be " + counter, count == counter); + assertTrue("Incorrect count: was " + counter + " should be " + count, count == counter); } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/InMemoryAppender.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/InMemoryAppender.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/InMemoryAppender.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/InMemoryAppender.java Tue Oct 25 07:41:10 2011 @@ -17,7 +17,7 @@ package org.apache.logging.log4j.core.appender; import org.apache.logging.log4j.core.Layout; -import org.apache.logging.log4j.core.filter.Filters; +import org.apache.logging.log4j.core.filter.CompositeFilter; import java.io.ByteArrayOutputStream; @@ -26,7 +26,7 @@ import java.io.ByteArrayOutputStream; */ public class InMemoryAppender extends OutputStreamAppender { - public InMemoryAppender(String name, Layout layout, Filters filters, boolean handleException) { + public InMemoryAppender(String name, Layout layout, CompositeFilter filters, boolean handleException) { super(name, layout, filters, handleException, true, new InMemoryManager(name)); } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/ListAppender.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/ListAppender.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/ListAppender.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/ListAppender.java Tue Oct 25 07:41:10 2011 @@ -23,12 +23,9 @@ import org.apache.logging.log4j.core.con import org.apache.logging.log4j.core.config.plugins.PluginAttr; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; -import org.apache.logging.log4j.core.filter.Filters; +import org.apache.logging.log4j.core.filter.CompositeFilter; import org.apache.logging.log4j.core.layout.SerializedLayout; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -56,8 +53,8 @@ public class ListAppender extends Append raw = false; } - public ListAppender(String name, Filters filters, Layout layout, boolean newline, boolean raw) { - super(name, filters, layout); + public ListAppender(String name, Filter filter, Layout layout, boolean newline, boolean raw) { + super(name, filter, layout); this.newLine = newline; this.raw = raw; if (layout != null && !(layout instanceof SerializedLayout)) { @@ -145,7 +142,7 @@ public class ListAppender extends Append @PluginAttr("entryPerNewLine") String newLine, @PluginAttr("raw") String raw, @PluginElement("layout") Layout layout, - @PluginElement("filters") Filters filters) { + @PluginElement("filters") Filter filter) { if (name == null) { logger.error("No name provided for ListAppender"); @@ -155,6 +152,6 @@ public class ListAppender extends Append boolean nl = (newLine == null) ? false : Boolean.parseBoolean(newLine); boolean r = (raw == null) ? false : Boolean.parseBoolean(raw); - return new ListAppender(name, filters, layout, nl, r); + return new ListAppender(name, filter, layout, nl, r); } } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/filter/BurstFilterTest.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/filter/BurstFilterTest.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/filter/BurstFilterTest.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/filter/BurstFilterTest.java Tue Oct 25 07:41:10 2011 @@ -54,14 +54,7 @@ public class BurstFilterTest { for (Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) { if (entry.getKey().equals("ListAppender")) { app = (ListAppender) entry.getValue(); - Iterator<Filter> iter = app.getFilters(); - while (iter.hasNext()) { - Filter f = iter.next(); - if (f instanceof BurstFilter) { - filter = (BurstFilter) f; - break; - } - } + filter = (BurstFilter) app.getFilter(); break; } } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java Tue Oct 25 07:41:10 2011 @@ -26,8 +26,8 @@ import org.apache.logging.log4j.core.Log import org.apache.logging.log4j.core.appender.ConsoleAppender; import org.apache.logging.log4j.core.appender.JMSQueueAppender; import org.apache.logging.log4j.core.appender.ListAppender; +import org.apache.logging.log4j.core.filter.CompositeFilter; import org.apache.logging.log4j.core.filter.FilterBase; -import org.apache.logging.log4j.core.filter.Filters; import org.apache.logging.log4j.core.layout.PatternLayout; import org.apache.logging.log4j.status.StatusConsoleListener; import org.apache.logging.log4j.status.StatusLogger; @@ -95,11 +95,11 @@ public class JMSQueueTest { public void testServer() throws Exception { Filter clientFilter = new MessageFilter(Filter.Result.NEUTRAL, Filter.Result.DENY); Filter serverFilter = new MessageFilter(Filter.Result.DENY, Filter.Result.NEUTRAL); - Filters clientFilters = Filters.createFilters(new Filter[] {clientFilter}); + CompositeFilter clientFilters = CompositeFilter.createFilters(new Filter[]{clientFilter}); JMSQueueAppender appender = JMSQueueAppender.createAppender(null, null, null, null, null, FACTORY_NAME, QUEUE_NAME, null, null, null, clientFilters, "true"); appender.start(); - Filters serverFilters = Filters.createFilters(new Filter[] {serverFilter}); + CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter}); ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false); listApp.start(); PatternLayout layout = new PatternLayout("%m %ex%n"); Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java Tue Oct 25 07:41:10 2011 @@ -26,8 +26,8 @@ import org.apache.logging.log4j.core.Log import org.apache.logging.log4j.core.appender.ConsoleAppender; import org.apache.logging.log4j.core.appender.JMSTopicAppender; import org.apache.logging.log4j.core.appender.ListAppender; +import org.apache.logging.log4j.core.filter.CompositeFilter; import org.apache.logging.log4j.core.filter.FilterBase; -import org.apache.logging.log4j.core.filter.Filters; import org.apache.logging.log4j.core.layout.PatternLayout; import org.apache.logging.log4j.status.StatusConsoleListener; import org.apache.logging.log4j.status.StatusLogger; @@ -95,11 +95,11 @@ public class JMSTopicTest { public void testServer() throws Exception { Filter clientFilter = new MessageFilter(Filter.Result.NEUTRAL, Filter.Result.DENY); Filter serverFilter = new MessageFilter(Filter.Result.DENY, Filter.Result.NEUTRAL); - Filters clientFilters = Filters.createFilters(new Filter[] {clientFilter}); + CompositeFilter clientFilters = CompositeFilter.createFilters(new Filter[]{clientFilter}); JMSTopicAppender appender = JMSTopicAppender.createAppender(null, null, null, null, null, FACTORY_NAME, TOPIC_NAME, null, null, null, clientFilters, "true"); appender.start(); - Filters serverFilters = Filters.createFilters(new Filter[] {serverFilter}); + CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter}); ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false); listApp.start(); PatternLayout layout = new PatternLayout("%m %ex%n"); Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/SocketServerTest.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/SocketServerTest.java?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/SocketServerTest.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/SocketServerTest.java Tue Oct 25 07:41:10 2011 @@ -26,28 +26,18 @@ import org.apache.logging.log4j.core.Log import org.apache.logging.log4j.core.appender.ConsoleAppender; import org.apache.logging.log4j.core.appender.ListAppender; import org.apache.logging.log4j.core.appender.SocketAppender; +import org.apache.logging.log4j.core.filter.CompositeFilter; import org.apache.logging.log4j.core.filter.FilterBase; -import org.apache.logging.log4j.core.filter.Filters; import org.apache.logging.log4j.core.layout.PatternLayout; -import org.apache.logging.log4j.core.net.SocketServer; import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -102,11 +92,11 @@ public class SocketServerTest { public void testServer() throws Exception { Filter socketFilter = new ThreadFilter(Filter.Result.NEUTRAL, Filter.Result.DENY); Filter serverFilter = new ThreadFilter(Filter.Result.DENY, Filter.Result.NEUTRAL); - Filters socketFilters = Filters.createFilters(new Filter[] {socketFilter}); + CompositeFilter socketFilters = CompositeFilter.createFilters(new Filter[]{socketFilter}); SocketAppender appender = SocketAppender.createAppender("localhost", PORT, "tcp", "-1", "Test", null, null, null, socketFilters); appender.start(); - Filters serverFilters = Filters.createFilters(new Filter[] {serverFilter}); + CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter}); ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false); appender.start(); PatternLayout layout = new PatternLayout("%m %ex%n"); Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/FlumeFuncTest.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/FlumeFuncTest.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/FlumeFuncTest.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/FlumeFuncTest.xml Tue Oct 25 07:41:10 2011 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration packages="" status="error" name="Flume"> - <Filters> - <Marker marker="EVENT" onMatch="ACCEPT" onMisMatch="NEUTRAL"/> - </Filters> + <MarkerFilter marker="EVENT" onMatch="ACCEPT" onMisMatch="NEUTRAL"/> <Appenders> <Flume name="eventLogger" suppressExceptions="false" mdcPrefix="." compress="true"> <Agent host="192.168.10.101" port="8800"/> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-burst.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-burst.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-burst.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-burst.xml Tue Oct 25 07:41:10 2011 @@ -1,12 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration status="warn" name="BurstTest"> <appenders> - <List name="ListAppender"> <PatternLayout pattern="%-5p %d{dd-MMM-yyyy HH:mm:ss} %t %m%n"/> - <filters> - <Burst level="INFO" rate="33" maxBurst="100"/> - </filters> + <BurstFilter level="INFO" rate="33" maxBurst="100"/> </List> </appenders> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling1.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling1.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling1.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling1.xml Tue Oct 25 07:41:10 2011 @@ -3,9 +3,7 @@ <properties> <property name="filename">target/rolling1/rollingtest.log</property> </properties> - <filters> - <Threshold level="debug"/> - </filters> + <ThresholdFilter level="debug"/> <appenders> <Console name="STDOUT"> @@ -18,19 +16,15 @@ <SizeBasedTriggeringPolicy size="500" /> </RollingFile> <List name="List"> - <filters> - <Threshold level="error"/> - </filters> + <ThresholdFilter level="error"/> </List> </appenders> <loggers> <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false"> - <filters> - <ThreadContextMap> - <KeyValuePair key="test" value="123"/> - </ThreadContextMap> - </filters> + <ThreadContextMapFilter> + <KeyValuePair key="test" value="123"/> + </ThreadContextMapFilter> <appender-ref ref="STDOUT"/> </logger>> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling2.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling2.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling2.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling2.xml Tue Oct 25 07:41:10 2011 @@ -4,7 +4,7 @@ <property name="filename">target/rolling2/rollingtest.log</property> </properties> <filters> - <Threshold level="debug"/> + <ThresholdFilter level="debug"/> </filters> <appenders> @@ -19,7 +19,7 @@ </RollingFile> <List name="List"> <filters> - <Threshold level="error"/> + <ThresholdFilter level="error"/> </filters> </List> </appenders> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling3.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling3.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling3.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-rolling3.xml Tue Oct 25 07:41:10 2011 @@ -3,9 +3,7 @@ <properties> <property name="filename">target/rolling3/rollingtest.log</property> </properties> - <filters> - <Threshold level="debug"/> - </filters> + <ThresholdFilter level="debug"/> <appenders> <Console name="STDOUT"> @@ -21,9 +19,7 @@ </Policies> </RollingFile> <List name="List"> - <filters> - <Threshold level="error"/> - </filters> + <ThresholdFilter level="error"/> </List> </appenders> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-routing.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-routing.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-routing.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-routing.xml Tue Oct 25 07:41:10 2011 @@ -3,18 +3,14 @@ <properties> <property name="filename">target/rolling1/rollingtest-$${sd:type}.log</property> </properties> - <filters> - <Threshold level="debug"/> - </filters> + <ThresholdFilter level="debug"/> <appenders> <Console name="STDOUT"> <PatternLayout pattern="%m%n"/> </Console> <List name="List"> - <filters> - <Threshold level="debug"/> - </filters> + <ThresholdFilter level="debug"/> </List> <Routing name="Routing"> <Routes pattern="$${sd:type}"> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-strict1.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-strict1.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-strict1.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-strict1.xml Tue Oct 25 07:41:10 2011 @@ -3,23 +3,21 @@ <properties> <property name="filename">target/test.log</property> </properties> - <filters> - <filter type="Threshold" level="trace"/> - </filters> + <filter type="ThresholdFilter" level="trace"/> <appenders> <appender type="Console" name="STDOUT"> <layout type="PatternLayout" pattern="%m MDC%X%n"/> <filters> - <filter type="Marker" marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"/> - <filter type="Marker" marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"/> + <filter type="MarkerFilter" marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"/> + <filter type="MarkerFilter" marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"/> </filters> </appender> <appender type="Console" name="FLOW"> <layout type="PatternLayout" pattern="%C{1}.%M %m %ex%n"/> <filters> - <filter type="Marker" marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/> - <filter type="Marker" marker="EXCEPTION" onMatch="ACCEPT" onMismatch="DENY"/> + <filter type="MarkerFilter" marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/> + <filter type="MarkerFilter" marker="EXCEPTION" onMatch="ACCEPT" onMismatch="DENY"/> </filters> </appender> <appender type="File" name="File" fileName="${filename}"> @@ -33,11 +31,9 @@ <loggers> <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false"> - <filters> - <filter type="ThreadContextMap"> - <KeyValuePair key="test" value="123"/> - </filter> - </filters> + <filter type="ThreadContextMapFilter"> + <KeyValuePair key="test" value="123"/> + </filter> <appender-ref ref="STDOUT"/> </logger>> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test1.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test1.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test1.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test1.xml Tue Oct 25 07:41:10 2011 @@ -3,9 +3,7 @@ <properties> <property name="filename">target/test.log</property> </properties> - <filters> - <Threshold level="debug"/> - </filters> + <ThresholdFilter level="debug"/> <appenders> <Console name="STDOUT"> @@ -18,18 +16,16 @@ </File> <List name="List"> <filters> - <Threshold level="error"/> + <ThresholdFilter level="error"/> </filters> </List> </appenders> <loggers> <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false"> - <filters> - <ThreadContextMap> + <ThreadContextMapFilter> <KeyValuePair key="test" value="123"/> - </ThreadContextMap> - </filters> + </ThreadContextMapFilter> <appender-ref ref="STDOUT"/> </logger>> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test2.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test2.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test2.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test2.xml Tue Oct 25 07:41:10 2011 @@ -3,23 +3,21 @@ <properties> <property name="filename">target/test.log</property> </properties> - <filters> - <Threshold level="trace"/> - </filters> + <ThresholdFilter level="trace"/> <appenders> <Console name="STDOUT"> <PatternLayout pattern="%m MDC%X%n"/> <filters> - <Marker marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"/> - <Marker marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"/> + <MarkerFilter marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"/> + <MarkerFilter marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"/> </filters> </Console> <Console name="FLOW"> <PatternLayout pattern="%C{1}.%M %m %ex%n"/> <filters> - <Marker marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/> - <Marker marker="EXCEPTION" onMatch="ACCEPT" onMismatch="DENY"/> + <MarkerFilter marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/> + <MarkerFilter marker="EXCEPTION" onMatch="ACCEPT" onMismatch="DENY"/> </filters> </Console> <File name="File" fileName="${filename}"> @@ -33,11 +31,9 @@ <loggers> <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false"> - <filters> - <ThreadContextMap> - <KeyValuePair key="test" value="123"/> - </ThreadContextMap> - </filters> + <ThreadContextMapFilter> + <KeyValuePair key="test" value="123"/> + </ThreadContextMapFilter> <appender-ref ref="STDOUT"/> </logger>> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/test/resources/log4j-test1.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/test/resources/log4j-test1.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/test/resources/log4j-test1.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/test/resources/log4j-test1.xml Tue Oct 25 07:41:10 2011 @@ -3,9 +3,7 @@ <properties> <property name="filename">target/test.log</property> </properties> - <filters> - <Threshold level="trace"/> - </filters> + <ThresholdFilter level="trace"/> <appenders> <List name="EventLogger"> Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/test/resources/log4j-test1.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/test/resources/log4j-test1.xml?rev=1188557&r1=1188556&r2=1188557&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/test/resources/log4j-test1.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/test/resources/log4j-test1.xml Tue Oct 25 07:41:10 2011 @@ -3,9 +3,7 @@ <properties> <property name="filename">target/test.log</property> </properties> - <filters> - <Threshold level="trace"/> - </filters> + <ThresholdFilter level="trace"/> <appenders> <List name="EventLogger">