You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2017/11/27 17:58:16 UTC

[1/4] logging-log4j2 git commit: Log4j samples folder names should match artifact IDs.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 7ecd87fd5 -> fb97e2b6b


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java b/log4j-samples/log4j-samples-loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
new file mode 100644
index 0000000..5c5321b
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j;
+
+import org.apache.logging.log4j.lookup.CustomLookup;
+import org.apache.logging.log4j.lookup.CustomMapMessage;
+import org.junit.Test;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Created by rgoers on 8/2/15.
+ */
+public class CustomPropertiesTest {
+
+    @Test
+    public void testProperties() throws Exception {
+        final Logger logger = LogManager.getLogger("TestProperties");
+        final Map<String, String> loggerProperties = new ConcurrentHashMap<>();
+        CustomLookup.setLoggerProperties("TestProperties", loggerProperties);
+        loggerProperties.put("key1", "CustomPropertiesTest");
+        loggerProperties.put("key2", "TestValue");
+        logger.debug("This is a test");
+    }
+
+    @Test
+    public void mapMessageProperties() throws Exception {
+        final Logger logger = LogManager.getLogger("MapProperties");
+        final Map<String, String> loggerProperties = new ConcurrentHashMap<>();
+        loggerProperties.put("key1", "CustomPropertiesTest");
+        loggerProperties.put("key2", "TestValue");
+        logger.debug(new CustomMapMessage("This is a test", loggerProperties));
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/src/test/resources/log4j2.xml b/log4j-samples/log4j-samples-loggerProperties/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..0aa688b
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/src/test/resources/log4j2.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<Configuration name="XMLPerfTest" status="error">
+    <Appenders>
+        <File name="TestLogfile" fileName="target/testlog4j2.log" immediateFlush="false">
+            <PatternLayout>
+                <Pattern>%d %5p [%t] %c{1}  - %m%n</Pattern>
+            </PatternLayout>
+        </File>
+        <RandomAccessFile name="RandomAccessLogFile" fileName="target/testCustomlog4j2.log" immediateFlush="false">
+            <PatternLayout>
+                <Pattern>%d %5p [%t] %c{1} %X{key1} %X{key2} - %m%n</Pattern>
+            </PatternLayout>
+        </RandomAccessFile>
+    </Appenders>
+    <Loggers>
+        <Logger name="TestProperties" level="debug" additivity="false">
+            <Property name="key1">$${custom:key1}</Property>
+            <Property name="key2">$${custom:key2}</Property>
+            <AppenderRef ref="RandomAccessLogFile"/>
+        </Logger>
+        <Logger name="MapProperties" level="debug" additivity="false">
+            <Property name="key1">$${mapMessage:key1}</Property>
+            <Property name="key2">$${mapMessage:key2}</Property>
+            <AppenderRef ref="RandomAccessLogFile"/>
+        </Logger>
+
+        <Root level="debug">
+            <AppenderRef ref="TestLogfile"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/.gitignore b/log4j-samples/loggerProperties/.gitignore
deleted file mode 100644
index ddd6d6d..0000000
--- a/log4j-samples/loggerProperties/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/.settings/
-/.classpath
-/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/pom.xml b/log4j-samples/loggerProperties/pom.xml
deleted file mode 100644
index e1e495c..0000000
--- a/log4j-samples/loggerProperties/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>log4j-samples</artifactId>
-    <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.10.1-SNAPSHOT</version>
-  </parent>
-  <artifactId>log4j-samples-loggerProperties</artifactId>
-  <packaging>jar</packaging>
-  <name>Apache Log4j Samples: LoggerProperties</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.8.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
deleted file mode 100644
index 8bd3415..0000000
--- a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.lookup;
-
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.Marker;
-import org.apache.logging.log4j.MarkerManager;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.lookup.AbstractLookup;
-import org.apache.logging.log4j.core.lookup.StrLookup;
-import org.apache.logging.log4j.status.StatusLogger;
-
-import java.lang.Override;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- *
- */
-
-@Plugin(name = "custom", category = StrLookup.CATEGORY)
-public class CustomLookup extends AbstractLookup {
-
-    private static final Logger LOGGER = StatusLogger.getLogger();
-    private static final Marker LOOKUP = MarkerManager.getMarker("LOOKUP");
-
-    private static ConcurrentMap<String, Map<String, String>> loggerProperties = new ConcurrentHashMap<>();
-
-    /**
-     * Looks up the value for the key using the data in the LogEvent.
-     * @param event The current LogEvent.
-     * @param key  the key to be looked up, may be null
-     * @return The value associated with the key.
-     */
-    @Override
-    public String lookup(final LogEvent event, final String key) {
-        try {
-            final Map<String, String> properties = loggerProperties.get(event.getLoggerName());
-            if (properties == null) {
-                return "";
-            }
-            if (key == null || key.length() == 0 || key.equals("*")) {
-                final StringBuilder sb = new StringBuilder("{");
-                boolean first = true;
-                for (final Map.Entry<String, String> entry : properties.entrySet()) {
-                    if (!first) {
-                        sb.append(", ");
-                    }
-                    sb.append(entry.getKey()).append("=").append(entry.getValue());
-                    first = false;
-                }
-                sb.append("}");
-                return sb.toString();
-            }
-            return properties.get(key);
-        } catch (final Exception ex) {
-            LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
-            return null;
-        }
-    }
-
-    public static void setLoggerProperties(final String loggerName, final Map<String, String> properties) {
-        loggerProperties.put(loggerName, properties);
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
deleted file mode 100644
index 06f78f4..0000000
--- a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.lookup;
-
-import org.apache.logging.log4j.message.AsynchronouslyFormattable;
-import org.apache.logging.log4j.message.StringMapMessage;
-
-import java.util.Map;
-
-/**
- *
- */
-@AsynchronouslyFormattable
-public class CustomMapMessage extends StringMapMessage {
-
-    private static final long serialVersionUID = 1L;
-    private final String message;
-
-    public CustomMapMessage(final String msg, final Map<String, String> map) {
-        super(map);
-        this.message = msg;
-    }
-
-    @Override
-    public String getFormattedMessage(final String[] formats) {
-        if (message != null) {
-            return message;
-        }
-        return super.getFormattedMessage(formats);
-    }
-
-    @Override
-    public String getFormattedMessage() {
-        if (message != null) {
-            return message;
-        }
-        return super.getFormattedMessage();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
deleted file mode 100644
index 1184382..0000000
--- a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.lookup;
-
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.Marker;
-import org.apache.logging.log4j.MarkerManager;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.lookup.AbstractLookup;
-import org.apache.logging.log4j.core.lookup.StrLookup;
-import org.apache.logging.log4j.message.StringMapMessage;
-import org.apache.logging.log4j.message.Message;
-import org.apache.logging.log4j.status.StatusLogger;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- *
- */
-
-@Plugin(name = "mapMessage", category = StrLookup.CATEGORY)
-public class MapMessageLookup extends AbstractLookup {
-
-    private static final Logger LOGGER = StatusLogger.getLogger();
-    private static final Marker LOOKUP = MarkerManager.getMarker("LOOKUP");
-
-    private static ConcurrentMap<String, Map<String, String>> loggerProperties = new ConcurrentHashMap<>();
-
-    /**
-     * Looks up the value for the key using the data in the LogEvent.
-     * @param event The current LogEvent.
-     * @param key  the key to be looked up, may be null
-     * @return The value associated with the key.
-     */
-    @Override
-    public String lookup(final LogEvent event, final String key) {
-        final Message msg = event.getMessage();
-        if (msg instanceof StringMapMessage) {
-            try {
-                final Map<String, String> properties = ((StringMapMessage) msg).getData();
-                if (properties == null) {
-                    return "";
-                }
-                if (key == null || key.length() == 0 || key.equals("*")) {
-                    final StringBuilder sb = new StringBuilder("{");
-                    boolean first = true;
-                    for (final Map.Entry<String, String> entry : properties.entrySet()) {
-                        if (!first) {
-                            sb.append(", ");
-                        }
-                        sb.append(entry.getKey()).append("=").append(entry.getValue());
-                        first = false;
-                    }
-                    sb.append("}");
-                    return sb.toString();
-                }
-                return properties.get(key);
-            } catch (final Exception ex) {
-                LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
-                return null;
-            }
-        }
-        return null;
-    }
-
-    public static void setLoggerProperties(final String loggerName, final Map<String, String> properties) {
-        loggerProperties.put(loggerName, properties);
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java b/log4j-samples/loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
deleted file mode 100644
index 5c5321b..0000000
--- a/log4j-samples/loggerProperties/src/test/java/org/apache/logging/log4j/CustomPropertiesTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j;
-
-import org.apache.logging.log4j.lookup.CustomLookup;
-import org.apache.logging.log4j.lookup.CustomMapMessage;
-import org.junit.Test;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Created by rgoers on 8/2/15.
- */
-public class CustomPropertiesTest {
-
-    @Test
-    public void testProperties() throws Exception {
-        final Logger logger = LogManager.getLogger("TestProperties");
-        final Map<String, String> loggerProperties = new ConcurrentHashMap<>();
-        CustomLookup.setLoggerProperties("TestProperties", loggerProperties);
-        loggerProperties.put("key1", "CustomPropertiesTest");
-        loggerProperties.put("key2", "TestValue");
-        logger.debug("This is a test");
-    }
-
-    @Test
-    public void mapMessageProperties() throws Exception {
-        final Logger logger = LogManager.getLogger("MapProperties");
-        final Map<String, String> loggerProperties = new ConcurrentHashMap<>();
-        loggerProperties.put("key1", "CustomPropertiesTest");
-        loggerProperties.put("key2", "TestValue");
-        logger.debug(new CustomMapMessage("This is a test", loggerProperties));
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/loggerProperties/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/test/resources/log4j2.xml b/log4j-samples/loggerProperties/src/test/resources/log4j2.xml
deleted file mode 100644
index 0aa688b..0000000
--- a/log4j-samples/loggerProperties/src/test/resources/log4j2.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<Configuration name="XMLPerfTest" status="error">
-    <Appenders>
-        <File name="TestLogfile" fileName="target/testlog4j2.log" immediateFlush="false">
-            <PatternLayout>
-                <Pattern>%d %5p [%t] %c{1}  - %m%n</Pattern>
-            </PatternLayout>
-        </File>
-        <RandomAccessFile name="RandomAccessLogFile" fileName="target/testCustomlog4j2.log" immediateFlush="false">
-            <PatternLayout>
-                <Pattern>%d %5p [%t] %c{1} %X{key1} %X{key2} - %m%n</Pattern>
-            </PatternLayout>
-        </RandomAccessFile>
-    </Appenders>
-    <Loggers>
-        <Logger name="TestProperties" level="debug" additivity="false">
-            <Property name="key1">$${custom:key1}</Property>
-            <Property name="key2">$${custom:key2}</Property>
-            <AppenderRef ref="RandomAccessLogFile"/>
-        </Logger>
-        <Logger name="MapProperties" level="debug" additivity="false">
-            <Property name="key1">$${mapMessage:key1}</Property>
-            <Property name="key2">$${mapMessage:key2}</Property>
-            <AppenderRef ref="RandomAccessLogFile"/>
-        </Logger>
-
-        <Root level="debug">
-            <AppenderRef ref="TestLogfile"/>
-        </Root>
-    </Loggers>
-</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/pom.xml b/log4j-samples/pom.xml
index 116ea93..3b1f67c 100644
--- a/log4j-samples/pom.xml
+++ b/log4j-samples/pom.xml
@@ -78,11 +78,11 @@
     </dependencies>
   </dependencyManagement>
   <modules>
-    <module>flume-common</module>
-    <module>flume-remote</module>
-    <module>flume-embedded</module>
-    <module>configuration</module>
-    <module>loggerProperties</module>
+    <module>log4j-samples-flume-common</module>
+    <module>log4j-samples-flume-remote</module>
+    <module>log4j-samples-flume-embedded</module>
+    <module>log4j-samples-configuration</module>
+    <module>log4j-samples-loggerProperties</module>
   </modules>
   <build>
     <plugins>


[3/4] logging-log4j2 git commit: Log4j samples folder names should match artifact IDs.

Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/resources/log4j-embedded.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/resources/log4j-embedded.xml b/log4j-samples/flume-embedded/src/main/resources/log4j-embedded.xml
deleted file mode 100755
index 056e1f4..0000000
--- a/log4j-samples/flume-embedded/src/main/resources/log4j-embedded.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<Configuration status="debug" name="Flume" verbose="false" monitorInterval="30">
-	<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
-	<Appenders>
-
-		<Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false" embedded="true" dataDir="/tmp">
-			<Agent host="localhost" port="8800" />
-			<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
-		</Flume>
-		<Console name="console">
-			<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36}:%L %M - %msg%n" />
-		</Console>
-		<RollingFile name="RollingFile" fileName="${sys:log.dir}/app.log"
-			filePattern="${sys:log.dir}/app-%d{MM-dd-yyyy}-%i.log.gz">
-			<PatternLayout>
-				<pattern>%d %p %C{1.} [%t] %m%n</pattern>
-			</PatternLayout>
-			<Policies>
-				<TimeBasedTriggeringPolicy />
-				<SizeBasedTriggeringPolicy size="250 MB" />
-			</Policies>
-		</RollingFile>
-	</Appenders>
-	<Loggers>
-		<Logger name="EventLogger" level="WARN" additivity="false">
-			<AppenderRef ref="flume" />
-		</Logger>
-		<Root level="debug">
-			<AppenderRef ref="RollingFile" />
-		</Root>
-	</Loggers>
-</Configuration>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml b/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
deleted file mode 100755
index f4b160d..0000000
--- a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
-	xmlns:context="http://www.springframework.org/schema/context" xmlns:oxm="http://www.springframework.org/schema/oxm"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-           http://www.springframework.org/schema/aop
-           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-           http://www.springframework.org/schema/tx
-           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-		   http://www.springframework.org/schema/oxm
-		   http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-	<context:component-scan base-package="org.apache.logging.log4j.samples">
-		<context:exclude-filter type="annotation"
-			expression="org.springframework.ws.server.endpoint.annotation.Endpoint" />
-		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
-	</context:component-scan>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml b/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
deleted file mode 100755
index 73f4fb6..0000000
--- a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:sws="http://www.springframework.org/schema/web-services"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-           http://www.springframework.org/schema/aop
-           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-           http://www.springframework.org/schema/oxm
-           http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
-           http://www.springframework.org/schema/tx
-           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-	<context:component-scan base-package="org.apache.logging.log4j.samples.*" />
-
-</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml b/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
deleted file mode 100755
index 7a64562..0000000
--- a/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-	<display-name>Global Logging Services</display-name>
-	<listener>
-		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-	</listener>
-
-	<servlet>
-		<servlet-name>rest</servlet-name>
-		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-		<load-on-startup>6</load-on-startup>
-	</servlet>
-
-	<servlet-mapping>
-		<servlet-name>rest</servlet-name>
-		<url-pattern>*.do</url-pattern>
-	</servlet-mapping>
-
-	<welcome-file-list>
-		<welcome-file>index.jsp</welcome-file>
-	</welcome-file-list>
-
-	<session-config>
-		<session-timeout>5</session-timeout>
-	</session-config>
-
-	<listener>
-		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
-	</listener>
-
-	<context-param>
-		<param-name>log4jConfiguration</param-name>
-		<param-value>file://${project.build.directory}/classes/log4j-embedded.xml</param-value>
-	</context-param>
-
-	<context-param>
-		<param-name>log4jContextName</param-name>
-		<param-value>GLS</param-value>
-	</context-param>
-</web-app>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/webapp/start.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/webapp/start.jsp b/log4j-samples/flume-embedded/src/main/webapp/start.jsp
deleted file mode 100644
index 8db53a2..0000000
--- a/log4j-samples/flume-embedded/src/main/webapp/start.jsp
+++ /dev/null
@@ -1,30 +0,0 @@
-<%--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
---%>
-<html>
-<body>
-
-<h2>Rest Client</h2>
-<p>
-    Started
-</p>
-<form action="stop.do" method="GET">
-    <input type="submit" value="Stop" />
-</form>
-</body>
-</html>
-
-

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/webapp/stop.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/webapp/stop.jsp b/log4j-samples/flume-embedded/src/main/webapp/stop.jsp
deleted file mode 100644
index fab3be6..0000000
--- a/log4j-samples/flume-embedded/src/main/webapp/stop.jsp
+++ /dev/null
@@ -1,28 +0,0 @@
-<%--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
---%>
-<html>
-<body>
-
-<h2>Rest Client</h2>
-<p>
-    Stopped
-</p>
-<form action="start.do" method="GET">
-    <input type="submit" value="Start" />
-</form>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/.gitignore b/log4j-samples/flume-remote/.gitignore
deleted file mode 100644
index 9f0fc21..0000000
--- a/log4j-samples/flume-remote/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.settings/
-/target/
-/.classpath
-/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/README.txt
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/README.txt b/log4j-samples/flume-remote/README.txt
deleted file mode 100644
index 3ab80d2..0000000
--- a/log4j-samples/flume-remote/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Sample to connect to a Flume Agent via Avro using the FlumeAppender.
-
-This sample uses the classes in the sample flume-common project. It will randomly pick from the events defined there
-and send them to Flume. At the same time it will intermix some random non-audit events.
-
-To run this sample:
-1. Run "mvn install" on the flume-common project.
-2. Download and install Flume.
-3. Copy the flume-conf.properties in src/main/resources/flume/conf to the conf directory of where Flume was installed.
-4. In a terminal window start flume using "bin/flume-ng agent --conf ./conf/ -f conf/flume-conf.properties -Dflume.root.logger=DEBUG,console -n agent"
-5. Verify Flume started and configured an Avro source, a memory channel and a logger sink by reviewing the startup log.
-6. In a separate terminal window run "mvn jetty:run" in this project.
-7. Verify the Flume appender connected to the Flume agent by finding "Starting FlumeAvroManager FlumeAvro[localhost:8800]"
-   in the jetty log and that there are no exceptions and also by seeing something like
-    "/127.0.0.1:53351 => /127.0.0.1:8800] OPEN" in the Flume log.
-8. In a separate terminal window in the project directory run "tail -f target/logs/app.log" to see the application
-   generate non-audit logs.
-9. In the browser go to url "http://localhost:8080/flumeAgent/start.do". A started message should appear on the screen.
-10. After verifying logs are being written click on the Stop button in the browser page.
-
-Note that the Flume agent must be started for the FlumeAppender to successfully start. If the Flume agent is stopped
-an exception will be thrown for each event that occurs while the agent is down. When the agent restarts the
-appender will automatically reconnect.
-
-The output from the Flume agent will include the generated Flume events. Since the events are sent individually
-Avro will print the full event and Flume will print a hex dump of the first few bytes of the event.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/pom.xml b/log4j-samples/flume-remote/pom.xml
deleted file mode 100644
index 956e095..0000000
--- a/log4j-samples/flume-remote/pom.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>log4j-samples</artifactId>
-    <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.10.1-SNAPSHOT</version>
-  </parent>
-  <artifactId>log4j-samples-flume-remote</artifactId>
-  <packaging>war</packaging>
-  <name>Apache Log4j Samples: Flume - Remote</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.logging.log4j.samples</groupId>
-      <artifactId>log4j-samples-flume-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-flume-ng</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.ws</groupId>
-      <artifactId>spring-ws-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <resources>
-      <resource>
-        <directory>../../src/main/resources</directory>
-      </resource>
-      <resource>
-        <directory>../../src/main/webapp/WEB-INF</directory>
-        <includes>
-          <include>web.xml</include>
-        </includes>
-        <filtering>true</filtering>
-        <targetPath>${project.build.directory}</targetPath>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>2.5.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.4</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>maven-jetty-plugin</artifactId>
-        <version>6.1.26</version>
-        <configuration>
-          <contextPath>flumeAgent</contextPath>
-          <webXml>${project.build.directory}/web.xml</webXml>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-          <stopKey>foo</stopKey>
-          <stopPort>9999</stopPort>
-          <systemProperties>
-            <systemProperty>
-              <name>log.dir</name>
-              <value>${project.build.directory}/logs</value>
-            </systemProperty>
-          </systemProperties>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.8.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/resources/flume/conf/flume-conf.properties
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/resources/flume/conf/flume-conf.properties b/log4j-samples/flume-remote/src/main/resources/flume/conf/flume-conf.properties
deleted file mode 100644
index 9cbbfde..0000000
--- a/log4j-samples/flume-remote/src/main/resources/flume/conf/flume-conf.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-# The configuration file needs to define the sources,
-# the channels and the sinks.
-# Sources, channels and sinks are defined per agent,
-# in this case called 'agent'
-
-agent.sources = avroSrc
-agent.channels = memoryChannel
-agent.sinks =  loggerSink
-
-# For each one of the sources, the type is defined
-# agent.sources.seqGenSrc.type = seq
-
-agent.sources.avroSrc.type = avro
-agent.sources.avroSrc.bind = localhost
-agent.sources.avroSrc.port = 8800
-
-# The channel can be defined as follows.
-agent.sources.avroSrc.channels = memoryChannel
-
-# Each sink's type must be defined
-agent.sinks.loggerSink.type = logger
-
-#Specify the channel the sink should use
-agent.sinks.loggerSink.channel = memoryChannel
-
-# Each channel's type is defined.
-agent.channels.memoryChannel.type = memory
-
-# Other config values specific to each type of channel(sink or source)
-# can be defined as well
-# In this case, it specifies the capacity of the memory channel
-agent.channels.memoryChannel.capacity = 100

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/resources/log4j-remote.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/resources/log4j-remote.xml b/log4j-samples/flume-remote/src/main/resources/log4j-remote.xml
deleted file mode 100755
index 324b17d..0000000
--- a/log4j-samples/flume-remote/src/main/resources/log4j-remote.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<Configuration status="debug" name="Flume" verbose="false" monitorInterval="30">
-	<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
-	<Appenders>
-
-		<Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false">
-			<Agent host="localhost" port="8800" />
-			<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
-		</Flume>
-		<Console name="console">
-			<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36}:%L %M - %msg%n" />
-		</Console>
-		<RollingFile name="RollingFile" fileName="${sys:log.dir}/app.log"
-			filePattern="${sys:log.dir}/app-%d{MM-dd-yyyy}-%i.log.gz">
-			<PatternLayout>
-				<pattern>%d %p %C{1.} [%t] %m%n</pattern>
-			</PatternLayout>
-			<Policies>
-				<TimeBasedTriggeringPolicy />
-				<SizeBasedTriggeringPolicy size="250 MB" />
-			</Policies>
-		</RollingFile>
-	</Appenders>
-	<Loggers>
-		<Logger name="EventLogger" level="WARN" additivity="false">
-			<AppenderRef ref="flume" />
-		</Logger>
-		<Root level="debug">
-			<AppenderRef ref="RollingFile" />
-		</Root>
-	</Loggers>
-</Configuration>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/applicationContext.xml b/log4j-samples/flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
deleted file mode 100755
index f4b160d..0000000
--- a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
-	xmlns:context="http://www.springframework.org/schema/context" xmlns:oxm="http://www.springframework.org/schema/oxm"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-           http://www.springframework.org/schema/aop
-           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-           http://www.springframework.org/schema/tx
-           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-		   http://www.springframework.org/schema/oxm
-		   http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-	<context:component-scan base-package="org.apache.logging.log4j.samples">
-		<context:exclude-filter type="annotation"
-			expression="org.springframework.ws.server.endpoint.annotation.Endpoint" />
-		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
-	</context:component-scan>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml b/log4j-samples/flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
deleted file mode 100755
index 73f4fb6..0000000
--- a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:sws="http://www.springframework.org/schema/web-services"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-           http://www.springframework.org/schema/aop
-           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-           http://www.springframework.org/schema/oxm
-           http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
-           http://www.springframework.org/schema/tx
-           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
-	<context:component-scan base-package="org.apache.logging.log4j.samples.*" />
-
-</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml b/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
deleted file mode 100755
index 0a0961d..0000000
--- a/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-	<display-name>Global Logging Services</display-name>
-	<listener>
-		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-	</listener>
-
-	<servlet>
-		<servlet-name>rest</servlet-name>
-		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-		<load-on-startup>6</load-on-startup>
-	</servlet>
-
-	<servlet-mapping>
-		<servlet-name>rest</servlet-name>
-		<url-pattern>*.do</url-pattern>
-	</servlet-mapping>
-
-	<welcome-file-list>
-		<welcome-file>index.jsp</welcome-file>
-	</welcome-file-list>
-
-	<session-config>
-		<session-timeout>5</session-timeout>
-	</session-config>
-
-	<listener>
-		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
-	</listener>
-
-	<context-param>
-		<param-name>log4jConfiguration</param-name>
-		<param-value>file://${project.build.directory}/classes/log4j-remote.xml</param-value>
-	</context-param>
-
-	<context-param>
-		<param-name>log4jContextName</param-name>
-		<param-value>GLS</param-value>
-	</context-param>
-</web-app>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/webapp/start.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/webapp/start.jsp b/log4j-samples/flume-remote/src/main/webapp/start.jsp
deleted file mode 100644
index 8db53a2..0000000
--- a/log4j-samples/flume-remote/src/main/webapp/start.jsp
+++ /dev/null
@@ -1,30 +0,0 @@
-<%--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
---%>
-<html>
-<body>
-
-<h2>Rest Client</h2>
-<p>
-    Started
-</p>
-<form action="stop.do" method="GET">
-    <input type="submit" value="Stop" />
-</form>
-</body>
-</html>
-
-

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-remote/src/main/webapp/stop.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/src/main/webapp/stop.jsp b/log4j-samples/flume-remote/src/main/webapp/stop.jsp
deleted file mode 100644
index fab3be6..0000000
--- a/log4j-samples/flume-remote/src/main/webapp/stop.jsp
+++ /dev/null
@@ -1,28 +0,0 @@
-<%--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
---%>
-<html>
-<body>
-
-<h2>Rest Client</h2>
-<p>
-    Stopped
-</p>
-<form action="start.do" method="GET">
-    <input type="submit" value="Start" />
-</form>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-configuration/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-configuration/.gitignore b/log4j-samples/log4j-samples-configuration/.gitignore
new file mode 100644
index 0000000..ddd6d6d
--- /dev/null
+++ b/log4j-samples/log4j-samples-configuration/.gitignore
@@ -0,0 +1,3 @@
+/.settings/
+/.classpath
+/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-configuration/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-configuration/pom.xml b/log4j-samples/log4j-samples-configuration/pom.xml
new file mode 100644
index 0000000..b4a86b4
--- /dev/null
+++ b/log4j-samples/log4j-samples-configuration/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>log4j-samples</artifactId>
+    <groupId>org.apache.logging.log4j.samples</groupId>
+    <version>2.10.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>log4j-samples-configuration</artifactId>
+  <packaging>jar</packaging>
+  <name>Apache Log4j Samples: Configuration</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java b/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
new file mode 100644
index 0000000..6e3bddb
--- /dev/null
+++ b/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.configuration;
+
+import java.io.Serializable;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.config.AbstractConfiguration;
+import org.apache.logging.log4j.core.config.ConfigurationSource;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.layout.PatternLayout;
+import org.apache.logging.log4j.util.PropertiesUtil;
+
+/**
+ * This Configuration is the same as the DefaultConfiguration but shows how a custom configuration can be built
+ * programmatically
+ */
+public class CustomConfiguration extends AbstractConfiguration {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * The name of the default configuration.
+     */
+    public static final String CONFIG_NAME = "Custom";
+
+    /**
+     * The System Property used to specify the logging level.
+     */
+    public static final String DEFAULT_LEVEL = "org.apache.logging.log4j.level";
+    /**
+     * The default Pattern used for the default Layout.
+     */
+    public static final String DEFAULT_PATTERN = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n";
+
+    public CustomConfiguration(final LoggerContext loggerContext) {
+        this(loggerContext, ConfigurationSource.NULL_SOURCE);
+    }
+
+    /**
+     * Constructor to create the default configuration.
+     */
+    public CustomConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
+        super(loggerContext, source);
+
+        setName(CONFIG_NAME);
+        final Layout<? extends Serializable> layout = PatternLayout.newBuilder()
+                .withPattern(DEFAULT_PATTERN)
+                .withConfiguration(this)
+                .build();
+        final Appender appender = ConsoleAppender.createDefaultAppenderForLayout(layout);
+        appender.start();
+        addAppender(appender);
+        final LoggerConfig root = getRootLogger();
+        root.addAppender(appender, null, null);
+
+        final String levelName = PropertiesUtil.getProperties().getStringProperty(DEFAULT_LEVEL);
+        final Level level = levelName != null && Level.valueOf(levelName) != null ?
+                Level.valueOf(levelName) : Level.ERROR;
+        root.setLevel(level);
+    }
+
+    @Override
+    protected void doConfigure() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java b/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
new file mode 100644
index 0000000..53b70c7
--- /dev/null
+++ b/log4j-samples/log4j-samples-configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.configuration;
+
+import java.net.URI;
+
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.core.config.ConfigurationSource;
+import org.apache.logging.log4j.core.config.Order;
+import org.apache.logging.log4j.core.config.plugins.Plugin;
+
+/**
+ * Factory to construct a  CustomConfiguration.
+ */
+@Plugin(name = "CustomConfigurationFactory", category = ConfigurationFactory.CATEGORY)
+@Order(50)
+public class CustomConfigurationFactory extends ConfigurationFactory {
+
+    /**
+     * Valid file extensions for XML files.
+     */
+    public static final String[] SUFFIXES = new String[] {"*"};
+
+    /**
+     * Returns the Configuration.
+     * @param source The InputSource.
+     * @return The Configuration.
+     */
+    @Override
+    public Configuration getConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
+        return new CustomConfiguration(loggerContext, source);
+    }
+
+    @Override
+    public Configuration getConfiguration(final LoggerContext loggerContext, final String name, final URI configLocation) {
+        return new CustomConfiguration(loggerContext);
+    }
+
+    /**
+     * Returns the file suffixes for XML files.
+     * @return An array of File extensions.
+     */
+    @Override
+    public String[] getSupportedTypes() {
+        return SUFFIXES;
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java b/log4j-samples/log4j-samples-configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
new file mode 100644
index 0000000..054a0f3
--- /dev/null
+++ b/log4j-samples/log4j-samples-configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.configuration;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class CustomConfigurationTest {
+    private final Logger logger = LogManager.getLogger(CustomConfiguration.class);
+
+    @Test
+    public void testLogging() {
+        logger.error("This is a test");
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/.gitignore b/log4j-samples/log4j-samples-flume-common/.gitignore
new file mode 100644
index 0000000..9f0fc21
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/.gitignore
@@ -0,0 +1,4 @@
+/.settings/
+/target/
+/.classpath
+/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/pom.xml b/log4j-samples/log4j-samples-flume-common/pom.xml
new file mode 100644
index 0000000..7643cb6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>log4j-samples</artifactId>
+    <groupId>org.apache.logging.log4j.samples</groupId>
+    <version>2.10.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>log4j-samples-flume-common</artifactId>
+  <packaging>jar</packaging>
+  <name>Apache Log4j Samples: Flume - Common</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.ws</groupId>
+      <artifactId>spring-ws-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
new file mode 100755
index 0000000..cc17609
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.app;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.apache.logging.log4j.EventLogger;
+import org.apache.logging.log4j.message.StructuredDataMessage;
+import org.apache.logging.log4j.samples.dto.AuditEvent;
+import org.apache.logging.log4j.samples.dto.Constraint;
+import org.apache.logging.log4j.samples.util.NamingUtils;
+
+/**
+ *
+ */
+public class LogEventFactory {
+
+    @SuppressWarnings("unchecked")
+    public static <T extends AuditEvent> T getEvent(final Class<T> intrface) {
+
+        final String eventId = NamingUtils.lowerFirst(intrface.getSimpleName());
+        final StructuredDataMessage msg = new StructuredDataMessage(eventId, null, "Audit");
+        return (T)Proxy.newProxyInstance(intrface
+            .getClassLoader(), new Class<?>[]{intrface}, new AuditProxy(msg, intrface));
+    }
+
+    private static class AuditProxy implements InvocationHandler {
+
+        private final StructuredDataMessage msg;
+        private final Class<?> intrface;
+
+        public AuditProxy(final StructuredDataMessage msg, final Class<?> intrface) {
+            this.msg = msg;
+            this.intrface = intrface;
+        }
+
+        @Override
+        public Object invoke(final Object o, final Method method, final Object[] objects)
+            throws Throwable {
+            if (method.getName().equals("logEvent")) {
+
+                final StringBuilder missing = new StringBuilder();
+
+                final Method[] methods = intrface.getMethods();
+
+                for (final Method _method : methods) {
+                    final String name = NamingUtils.lowerFirst(NamingUtils
+                        .getMethodShortName(_method.getName()));
+
+                    final Annotation[] annotations = _method.getDeclaredAnnotations();
+                    for (final Annotation annotation : annotations) {
+                        final Constraint constraint = (Constraint) annotation;
+
+                        if (constraint.required() && msg.get(name) == null) {
+                            if (missing.length() > 0) {
+                                missing.append(", ");
+                            }
+                            missing.append(name);
+                        }
+                    }
+                }
+
+                if (missing.length() > 0) {
+                    throw new IllegalStateException("Event " + msg.getId().getName() +
+                        " is missing required attributes " + missing);
+                }
+                EventLogger.logEvent(msg);
+            }
+            if (method.getName().equals("setCompletionStatus")) {
+                final String name = NamingUtils.lowerFirst(NamingUtils.getMethodShortName(method.getName()));
+                msg.put(name, objects[0].toString());
+            }
+            if (method.getName().startsWith("set")) {
+                final String name = NamingUtils.lowerFirst(NamingUtils.getMethodShortName(method.getName()));
+
+                /*
+                 * Perform any validation here. Currently the catalog doesn't
+                 * contain any information on validation rules.
+                 */
+                msg.put(name, objects[0].toString());
+            }
+
+            return null;
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
new file mode 100644
index 0000000..944082f
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.app;
+
+import java.util.List;
+import java.util.Random;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.samples.dto.AuditEvent;
+import org.apache.logging.log4j.samples.dto.RequestContext;
+
+
+/**
+ * The Class LoggingApp.
+ */
+public class LoggingApp {
+
+    /**
+     * The logger.
+     */
+    private static Logger logger = LogManager.getLogger(LoggingApp.class);
+
+    private final Random ran = new Random();
+
+    private List<AuditEvent> events;
+
+    public static void main(final String[] args) {
+        String member = "fakemember";
+        if (args.length == 1) {
+            member = args[0];
+        }
+        final LoggingApp app = new LoggingApp(member);
+        app.runApp(member);
+        System.out.println("Job ended");
+    }
+
+    public LoggingApp(final String member) {
+
+        ThreadContext.clearMap();
+
+        RequestContext.setSessionId("session1234");
+        RequestContext.setIpAddress("127.0.0.1");
+        RequestContext.setClientId("02121");
+        RequestContext.setProductName("IB");
+        RequestContext.setProductVersion("4.18.1");
+        RequestContext.setLocale("en_US");
+        RequestContext.setRegion("prod");
+
+        if (events == null) {
+            events = MockEventsSupplier.getAllEvents(member);
+        }
+    }
+
+    public void runApp(final String member) {
+        final Worker worker = new Worker(member);
+        worker.start();
+        sleep(30000);
+        worker.shutdown();
+        sleep(5000);
+    }
+
+    private void sleep(final long millis) {
+        try {
+            Thread.sleep(millis);
+        } catch (final InterruptedException ie) {
+            //
+        }
+    }
+
+
+    public class Worker extends Thread {
+
+        private final String member;
+
+        private boolean shutdown = false;
+
+        public Worker(final String member) {
+            this.member = member;
+        }
+
+        @Override
+        public void run() {
+            System.out.println("STARTING..................");
+
+            while (!shutdown) {
+                // Generate rand number between 1 to 10
+                final int rand = ran.nextInt(9) + 1;
+
+                // Sleep for rand seconds
+                try {
+                    Thread.sleep(rand * 1000);
+                } catch (final InterruptedException e) {
+                    logger.warn("WARN", e);
+                }
+
+                // Write rand number of logs
+                for (int i = 0; i < rand; i++) {
+                    final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
+                    final AuditEvent event = events.get(eventIndex);
+                    RequestContext.setUserId(member);
+                    event.logEvent();
+
+                    if ((rand % 4) == 1) {
+                        logger.debug("DEBUG level logging.....");
+                    } else if ((rand % 4) == 2) {
+                        logger.info("INFO level logging.....");
+                    } else if ((rand % 4) == 3) {
+                        logger.warn("WARN level logging.....");
+                    } else {
+                        logger.error("ERROR level logging.....");
+                    }
+                }
+
+            }
+        }
+
+        public void shutdown() {
+            this.shutdown = true;
+            try {
+                this.join();
+            } catch (final InterruptedException ie) {
+                //
+            }
+            System.out.println("SHUTDOWN.......................");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
new file mode 100755
index 0000000..e77650a
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.app;
+
+import java.util.List;
+import java.util.Random;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.samples.dto.AuditEvent;
+import org.apache.logging.log4j.samples.dto.RequestContext;
+import org.apache.logging.log4j.util.Strings;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+
+/**
+ * The Class LoggingController.
+ */
+@Controller
+public class LoggingController {
+
+    /**
+     * The logger.
+     */
+    private static Logger logger = LogManager.getLogger(LoggingController.class);
+
+    private volatile boolean generateLog = false;
+    private final Random ran = new Random();
+
+    private List<AuditEvent> events;
+    private int timeBase = 1000;
+
+    @RequestMapping(value = "/start.do", method = RequestMethod.GET)
+    public ModelAndView startLogging(
+        @RequestParam(value = "member", required = false, defaultValue = "fakemember") final String member,
+        @RequestParam(value = "interval", required = false, defaultValue = "1000") final String interval,
+        @RequestParam(value = "threads", required = false, defaultValue = "1") final String threadCount,
+                      final HttpServletRequest servletRequest) {
+        int numThreads = 1;
+        if (Strings.isNotEmpty(threadCount)) {
+            try {
+                numThreads = Integer.parseInt(threadCount);
+            } catch (final Exception ex) {
+                System.out.println("Invalid threadCount specified: " + threadCount);
+            }
+        }
+        if (Strings.isNotEmpty(interval)) {
+            try {
+                timeBase = Integer.parseInt(interval);
+            } catch (final Exception ex) {
+                System.out.println("Invalid interval specified: " + interval);
+            }
+        }
+        System.out.println("STARTING - Using " + numThreads + " threads at interval: " + timeBase);
+
+        if (events == null) {
+            events = MockEventsSupplier.getAllEvents(member);
+        }
+
+        generateLog = true;
+
+        for (int i = 0; i < numThreads; ++i) {
+            (new Thread() {
+
+                @Override
+                public void run() {
+                    ThreadContext.clearMap();
+
+                    RequestContext.setSessionId("session1234");
+                    RequestContext.setIpAddress("127.0.0.1");
+                    RequestContext.setClientId("02121");
+                    RequestContext.setProductName("IB");
+                    RequestContext.setProductVersion("4.18.1");
+                    RequestContext.setLocale("en_US");
+                    RequestContext.setRegion("prod");
+                    while (generateLog) {
+                        // Generate rand number between 1 to 10
+                        final int rand = ran.nextInt(9) + 1;
+
+                        // Sleep for rand seconds
+                        try {
+                            Thread.sleep(rand * timeBase);
+                        } catch (final InterruptedException e) {
+                            logger.warn("WARN", e);
+                        }
+
+                        // Write rand number of logs
+                        for (int i = 0; i < rand; i++) {
+                            final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
+                            final AuditEvent event = events.get(eventIndex);
+                            RequestContext.setUserId(member);
+                            event.logEvent();
+
+                            if ((rand % 4) == 1) {
+                                logger.debug("DEBUG level logging.....");
+                            } else if ((rand % 4) == 2) {
+                                logger.info("INFO level logging.....");
+                            } else if ((rand % 4) == 3) {
+                                logger.warn("WARN level logging.....");
+                            } else {
+                                logger.error("ERROR level logging.....");
+                            }
+                        }
+
+                    }
+                    ThreadContext.cloneStack();
+                }
+            }).start();
+        }
+
+        return new ModelAndView("start.jsp");
+    }
+
+    @RequestMapping(value = "/stop.do", method = RequestMethod.GET)
+    public ModelAndView stopLogging(final HttpServletRequest servletRequest) {
+        generateLog = false;
+        return new ModelAndView("stop.jsp");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
new file mode 100755
index 0000000..bdd64b4
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.app;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.logging.log4j.samples.dto.AuditEvent;
+import org.apache.logging.log4j.samples.events.Alert;
+import org.apache.logging.log4j.samples.events.ChangePassword;
+import org.apache.logging.log4j.samples.events.Login;
+import org.apache.logging.log4j.samples.events.ScheduledTransaction;
+import org.apache.logging.log4j.samples.events.Transfer;
+
+public class MockEventsSupplier {
+
+    /* This provides random generation */
+    static Random random = new Random();
+
+    public static List<AuditEvent> getAllEvents(final String member) {
+
+        final List<AuditEvent> events = new ArrayList<>();
+
+
+        final Login login = LogEventFactory.getEvent(Login.class);
+        login.setStartPageOption("account summary");
+        login.setSource("online");
+        login.setMember(member);
+        events.add(login);
+
+        final ChangePassword changePassword = LogEventFactory.getEvent(ChangePassword.class);
+        changePassword.setMember(member);
+        events.add(changePassword);
+
+        final Transfer transfer = LogEventFactory.getEvent(Transfer.class);
+
+        transfer.setAmount("4251");
+        transfer.setFromAccount("REPLACE"); // getAccount(mbr, accounts));
+        transfer.setToAccount("31142553");
+        transfer.setReference("DI-2415220110804");
+        transfer.setComment("My Transfer");
+        transfer.setMemo("For dinner");
+        transfer.setPayment("Use Checking");
+        transfer.setTransactionType("1");
+        transfer.setSource("IB Transfer page");
+        transfer.setCompletionStatus("complete");
+        transfer.setMember(member);
+        events.add(transfer);
+
+        final Alert alert = LogEventFactory.getEvent(Alert.class);
+
+        alert.setAction("add");
+        alert.setType("balance alert");
+        alert.setAccountNumber("REPLACE"); // , getAccount(mbr, accounts));
+        alert.setTrigger("GT");
+        alert.setThreshold("1000");
+        alert.setMember(member);
+        events.add(alert);
+
+        final ScheduledTransaction scheduledTransaction = LogEventFactory
+                .getEvent(ScheduledTransaction.class);
+
+        scheduledTransaction.setAction("add");
+        scheduledTransaction.setFromAccount("REPLACE"); // getAccount(mbr,
+                                                        // accounts));
+        scheduledTransaction.setToAccount("REPLACE"); // "9200000214");
+        scheduledTransaction.setAmount("2541");
+        scheduledTransaction.setStartDate("20110105");
+        scheduledTransaction.setMember("256");
+        scheduledTransaction.setFrequency("4");
+        scheduledTransaction.setMemo("Scheduled Transfer");
+        scheduledTransaction.setPayment("3456");
+        scheduledTransaction.setCompletionNotification("Was completed");
+        scheduledTransaction.setEndDate("2020-05-30");
+        scheduledTransaction.setSrtId("Calabasas2341");
+        scheduledTransaction.setSource("Home Page");
+        scheduledTransaction.setCompletionStatus("success");
+        scheduledTransaction.setMember(member);
+        events.add(scheduledTransaction);
+
+        return events;
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
new file mode 100755
index 0000000..67694e6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.dto;
+
+/**
+ * Interface that indicates the Class was generated by the DTOManager.
+ */
+public interface AuditEvent {
+
+    void logEvent();
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
new file mode 100755
index 0000000..c0e83cf
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.dto;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.logging.log4j.util.Strings;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Constraint {
+
+    boolean required() default false;
+
+    String pattern() default Strings.EMPTY;
+
+    int minLength() default -1;
+
+    int maxLength() default -1;
+
+    int totalDigits() default -1;
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
new file mode 100644
index 0000000..f7b6fc5
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.dto;
+
+import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.util.UuidUtil;
+
+/**
+ *
+ */
+public final class RequestContext {
+
+    private RequestContext() {
+    }
+    // Unique token to identify this request.
+    public static final String REQUEST_ID = "id";
+    // Token used to correlate multiple events within the request.
+    public static final String TRANSACTION_ID = "transId";
+    // The requested resource.
+    public static final String REQUEST_URI = "requestURI";
+    // Identify the user's session - should never contain the HTTP SessionId.
+    public static final String SESSION_ID = "sessionId";
+    // The id the user logged in with.
+    public static final String LOGIN_ID = "loginId";
+    // The id the system associates with the user.
+    public static final String USER_ID = "userId";
+    // user, admin, etc.
+    public static final String USER_TYPE = "userType";
+    // client id in a multi-tenant application
+    public static final String CLIENT_ID = "clientId";
+    // The user's ipAddress.
+    public static final String IP_ADDRESS = "ipAddress";
+    // The name of the product.
+    public static final String PRODUCT_NAME = "productName";
+    // The product version.
+    public static final String PRODUCT_VERSION = "productVersion";
+    // The users locale.
+    public static final String LOCALE = "locale";
+    // prod, preprod, beta, dev, etc.
+    public static final String REGION = "region";
+    // The user agent string from the browser.
+    public static final String USER_AGENT = "userAgent";
+
+    public static void initialize() {
+        ThreadContext.clearMap();
+        ThreadContext.put(REQUEST_ID, UuidUtil.getTimeBasedUuid().toString());
+    }
+
+    public static String getId() {
+        return ThreadContext.get(REQUEST_ID);
+    }
+
+    public static void setSessionId(final String id) {
+        ThreadContext.put(SESSION_ID, id);
+    }
+
+    public static String getSessionId() {
+        return ThreadContext.get(SESSION_ID);
+    }
+
+    public static void setTransId(final String id) {
+        ThreadContext.put(TRANSACTION_ID,  id);
+    }
+
+    public static String getTransId() {
+        return ThreadContext.get(TRANSACTION_ID);
+    }
+
+    public static void setRequestURI(final String URI) {
+        ThreadContext.put(REQUEST_URI,  URI);
+    }
+
+    public static String getRequestURI() {
+        return ThreadContext.get(REQUEST_URI);
+    }
+
+    public static void setLoginId(final String id) {
+        ThreadContext.put(LOGIN_ID,  id);
+    }
+
+    public static String getLoginId() {
+        return ThreadContext.get(LOGIN_ID);
+    }
+
+    public static void setUserId(final String id) {
+        ThreadContext.put(USER_ID,  id);
+    }
+
+    public static String getUserId() {
+        return ThreadContext.get(USER_ID);
+    }
+
+    public static void setUserType(final String type) {
+        ThreadContext.put(USER_TYPE,  type);
+    }
+
+    public static String getUserType() {
+        return ThreadContext.get(USER_TYPE);
+    }
+
+    public static void setClientId(final String id) {
+        ThreadContext.put(CLIENT_ID,  id);
+    }
+
+    public static String getClientId() {
+        return ThreadContext.get(CLIENT_ID);
+    }
+
+    public static void setIpAddress(final String addr) {
+        ThreadContext.put(IP_ADDRESS,  addr);
+    }
+
+    public static String getIpAddress() {
+        return ThreadContext.get(IP_ADDRESS);
+    }
+
+    public static void setProductName(final String productName) {
+        ThreadContext.put(PRODUCT_NAME, productName);
+    }
+
+    public static String getProductName() {
+        return ThreadContext.get(PRODUCT_NAME);
+    }
+
+
+    public static void setProductVersion(final String productVersion) {
+        ThreadContext.put(PRODUCT_VERSION, productVersion);
+    }
+
+    public static String getProductVersion() {
+        return ThreadContext.get(PRODUCT_VERSION);
+    }
+
+    public static void setLocale(final String locale) {
+        ThreadContext.put(LOCALE, locale);
+    }
+
+    public static String getLocale() {
+        return ThreadContext.get(LOCALE);
+    }
+
+    public static void setRegion(final String region) {
+        ThreadContext.put(REGION, region);
+    }
+
+    public static String getRegion() {
+        return ThreadContext.get(REGION);
+    }
+
+    public static void setUserAgent(final String agent) {
+        ThreadContext.put(USER_AGENT, agent);
+    }
+
+    public static String getUserAgent() {
+        return ThreadContext.get(USER_AGENT);
+    }
+
+}


[4/4] logging-log4j2 git commit: Log4j samples folder names should match artifact IDs.

Posted by gg...@apache.org.
Log4j samples folder names should match artifact IDs.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fb97e2b6
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fb97e2b6
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fb97e2b6

Branch: refs/heads/master
Commit: fb97e2b6bd945da5733ac7c7a5c785b3a013a838
Parents: 7ecd87f
Author: Gary Gregory <gg...@apache.org>
Authored: Mon Nov 27 12:58:11 2017 -0500
Committer: Gary Gregory <gg...@apache.org>
Committed: Mon Nov 27 12:58:11 2017 -0500

----------------------------------------------------------------------
 log4j-samples/configuration/.gitignore          |   3 -
 log4j-samples/configuration/pom.xml             |  63 -------
 .../configuration/CustomConfiguration.java      |  84 ---------
 .../CustomConfigurationFactory.java             |  63 -------
 .../configuration/CustomConfigurationTest.java  |  33 ----
 log4j-samples/flume-common/.gitignore           |   4 -
 log4j-samples/flume-common/pom.xml              |  84 ---------
 .../log4j/samples/app/LogEventFactory.java      | 104 -----------
 .../logging/log4j/samples/app/LoggingApp.java   | 143 ---------------
 .../log4j/samples/app/LoggingController.java    | 141 ---------------
 .../log4j/samples/app/MockEventsSupplier.java   |  98 -----------
 .../logging/log4j/samples/dto/AuditEvent.java   |  25 ---
 .../logging/log4j/samples/dto/Constraint.java   |  39 -----
 .../log4j/samples/dto/RequestContext.java       | 172 -------------------
 .../logging/log4j/samples/events/Alert.java     |  78 ---------
 .../log4j/samples/events/ChangePassword.java    |  34 ----
 .../logging/log4j/samples/events/Login.java     |  46 -----
 .../samples/events/ScheduledTransaction.java    | 128 --------------
 .../logging/log4j/samples/events/Transfer.java  | 172 -------------------
 .../logging/log4j/samples/util/NamingUtils.java |  85 ---------
 log4j-samples/flume-embedded/.gitignore         |   4 -
 log4j-samples/flume-embedded/README.txt         |  22 ---
 log4j-samples/flume-embedded/pom.xml            | 151 ----------------
 .../resources/flume/conf/flume-conf.properties  |  50 ------
 .../src/main/resources/log4j-embedded.xml       |  49 ------
 .../main/webapp/WEB-INF/applicationContext.xml  |  39 -----
 .../src/main/webapp/WEB-INF/rest-servlet.xml    |  36 ----
 .../src/main/webapp/WEB-INF/web.xml             |  61 -------
 .../flume-embedded/src/main/webapp/start.jsp    |  30 ----
 .../flume-embedded/src/main/webapp/stop.jsp     |  28 ---
 log4j-samples/flume-remote/.gitignore           |   4 -
 log4j-samples/flume-remote/README.txt           |  26 ---
 log4j-samples/flume-remote/pom.xml              | 139 ---------------
 .../resources/flume/conf/flume-conf.properties  |  50 ------
 .../src/main/resources/log4j-remote.xml         |  49 ------
 .../main/webapp/WEB-INF/applicationContext.xml  |  39 -----
 .../src/main/webapp/WEB-INF/rest-servlet.xml    |  36 ----
 .../src/main/webapp/WEB-INF/web.xml             |  61 -------
 .../flume-remote/src/main/webapp/start.jsp      |  30 ----
 .../flume-remote/src/main/webapp/stop.jsp       |  28 ---
 .../log4j-samples-configuration/.gitignore      |   3 +
 .../log4j-samples-configuration/pom.xml         |  63 +++++++
 .../configuration/CustomConfiguration.java      |  84 +++++++++
 .../CustomConfigurationFactory.java             |  63 +++++++
 .../configuration/CustomConfigurationTest.java  |  33 ++++
 .../log4j-samples-flume-common/.gitignore       |   4 +
 .../log4j-samples-flume-common/pom.xml          |  84 +++++++++
 .../log4j/samples/app/LogEventFactory.java      | 104 +++++++++++
 .../logging/log4j/samples/app/LoggingApp.java   | 143 +++++++++++++++
 .../log4j/samples/app/LoggingController.java    | 141 +++++++++++++++
 .../log4j/samples/app/MockEventsSupplier.java   |  98 +++++++++++
 .../logging/log4j/samples/dto/AuditEvent.java   |  25 +++
 .../logging/log4j/samples/dto/Constraint.java   |  39 +++++
 .../log4j/samples/dto/RequestContext.java       | 172 +++++++++++++++++++
 .../logging/log4j/samples/events/Alert.java     |  78 +++++++++
 .../log4j/samples/events/ChangePassword.java    |  34 ++++
 .../logging/log4j/samples/events/Login.java     |  46 +++++
 .../samples/events/ScheduledTransaction.java    | 128 ++++++++++++++
 .../logging/log4j/samples/events/Transfer.java  | 172 +++++++++++++++++++
 .../logging/log4j/samples/util/NamingUtils.java |  85 +++++++++
 .../log4j-samples-flume-embedded/.gitignore     |   4 +
 .../log4j-samples-flume-embedded/README.txt     |  22 +++
 .../log4j-samples-flume-embedded/pom.xml        | 151 ++++++++++++++++
 .../resources/flume/conf/flume-conf.properties  |  50 ++++++
 .../src/main/resources/log4j-embedded.xml       |  49 ++++++
 .../main/webapp/WEB-INF/applicationContext.xml  |  39 +++++
 .../src/main/webapp/WEB-INF/rest-servlet.xml    |  36 ++++
 .../src/main/webapp/WEB-INF/web.xml             |  61 +++++++
 .../src/main/webapp/start.jsp                   |  30 ++++
 .../src/main/webapp/stop.jsp                    |  28 +++
 .../log4j-samples-flume-remote/.gitignore       |   4 +
 .../log4j-samples-flume-remote/README.txt       |  26 +++
 .../log4j-samples-flume-remote/pom.xml          | 139 +++++++++++++++
 .../resources/flume/conf/flume-conf.properties  |  50 ++++++
 .../src/main/resources/log4j-remote.xml         |  49 ++++++
 .../main/webapp/WEB-INF/applicationContext.xml  |  39 +++++
 .../src/main/webapp/WEB-INF/rest-servlet.xml    |  36 ++++
 .../src/main/webapp/WEB-INF/web.xml             |  61 +++++++
 .../src/main/webapp/start.jsp                   |  30 ++++
 .../src/main/webapp/stop.jsp                    |  28 +++
 .../log4j-samples-loggerProperties/.gitignore   |   3 +
 .../log4j-samples-loggerProperties/pom.xml      |  63 +++++++
 .../logging/log4j/lookup/CustomLookup.java      |  83 +++++++++
 .../logging/log4j/lookup/CustomMapMessage.java  |  54 ++++++
 .../logging/log4j/lookup/MapMessageLookup.java  |  88 ++++++++++
 .../logging/log4j/CustomPropertiesTest.java     |  51 ++++++
 .../src/test/resources/log4j2.xml               |  48 ++++++
 log4j-samples/loggerProperties/.gitignore       |   3 -
 log4j-samples/loggerProperties/pom.xml          |  63 -------
 .../logging/log4j/lookup/CustomLookup.java      |  83 ---------
 .../logging/log4j/lookup/CustomMapMessage.java  |  54 ------
 .../logging/log4j/lookup/MapMessageLookup.java  |  88 ----------
 .../logging/log4j/CustomPropertiesTest.java     |  51 ------
 .../src/test/resources/log4j2.xml               |  48 ------
 log4j-samples/pom.xml                           |  10 +-
 95 files changed, 2926 insertions(+), 2926 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/configuration/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/.gitignore b/log4j-samples/configuration/.gitignore
deleted file mode 100644
index ddd6d6d..0000000
--- a/log4j-samples/configuration/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/.settings/
-/.classpath
-/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/configuration/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/pom.xml b/log4j-samples/configuration/pom.xml
deleted file mode 100644
index b4a86b4..0000000
--- a/log4j-samples/configuration/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>log4j-samples</artifactId>
-    <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.10.1-SNAPSHOT</version>
-  </parent>
-  <artifactId>log4j-samples-configuration</artifactId>
-  <packaging>jar</packaging>
-  <name>Apache Log4j Samples: Configuration</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.8.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java b/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
deleted file mode 100644
index 6e3bddb..0000000
--- a/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.configuration;
-
-import java.io.Serializable;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.Appender;
-import org.apache.logging.log4j.core.Layout;
-import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.appender.ConsoleAppender;
-import org.apache.logging.log4j.core.config.AbstractConfiguration;
-import org.apache.logging.log4j.core.config.ConfigurationSource;
-import org.apache.logging.log4j.core.config.LoggerConfig;
-import org.apache.logging.log4j.core.layout.PatternLayout;
-import org.apache.logging.log4j.util.PropertiesUtil;
-
-/**
- * This Configuration is the same as the DefaultConfiguration but shows how a custom configuration can be built
- * programmatically
- */
-public class CustomConfiguration extends AbstractConfiguration {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * The name of the default configuration.
-     */
-    public static final String CONFIG_NAME = "Custom";
-
-    /**
-     * The System Property used to specify the logging level.
-     */
-    public static final String DEFAULT_LEVEL = "org.apache.logging.log4j.level";
-    /**
-     * The default Pattern used for the default Layout.
-     */
-    public static final String DEFAULT_PATTERN = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n";
-
-    public CustomConfiguration(final LoggerContext loggerContext) {
-        this(loggerContext, ConfigurationSource.NULL_SOURCE);
-    }
-
-    /**
-     * Constructor to create the default configuration.
-     */
-    public CustomConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
-        super(loggerContext, source);
-
-        setName(CONFIG_NAME);
-        final Layout<? extends Serializable> layout = PatternLayout.newBuilder()
-                .withPattern(DEFAULT_PATTERN)
-                .withConfiguration(this)
-                .build();
-        final Appender appender = ConsoleAppender.createDefaultAppenderForLayout(layout);
-        appender.start();
-        addAppender(appender);
-        final LoggerConfig root = getRootLogger();
-        root.addAppender(appender, null, null);
-
-        final String levelName = PropertiesUtil.getProperties().getStringProperty(DEFAULT_LEVEL);
-        final Level level = levelName != null && Level.valueOf(levelName) != null ?
-                Level.valueOf(levelName) : Level.ERROR;
-        root.setLevel(level);
-    }
-
-    @Override
-    protected void doConfigure() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java b/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
deleted file mode 100644
index 53b70c7..0000000
--- a/log4j-samples/configuration/src/main/java/org/apache/logging/log4j/configuration/CustomConfigurationFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.configuration;
-
-import java.net.URI;
-
-import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.config.Configuration;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.core.config.ConfigurationSource;
-import org.apache.logging.log4j.core.config.Order;
-import org.apache.logging.log4j.core.config.plugins.Plugin;
-
-/**
- * Factory to construct a  CustomConfiguration.
- */
-@Plugin(name = "CustomConfigurationFactory", category = ConfigurationFactory.CATEGORY)
-@Order(50)
-public class CustomConfigurationFactory extends ConfigurationFactory {
-
-    /**
-     * Valid file extensions for XML files.
-     */
-    public static final String[] SUFFIXES = new String[] {"*"};
-
-    /**
-     * Returns the Configuration.
-     * @param source The InputSource.
-     * @return The Configuration.
-     */
-    @Override
-    public Configuration getConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
-        return new CustomConfiguration(loggerContext, source);
-    }
-
-    @Override
-    public Configuration getConfiguration(final LoggerContext loggerContext, final String name, final URI configLocation) {
-        return new CustomConfiguration(loggerContext);
-    }
-
-    /**
-     * Returns the file suffixes for XML files.
-     * @return An array of File extensions.
-     */
-    @Override
-    public String[] getSupportedTypes() {
-        return SUFFIXES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java b/log4j-samples/configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
deleted file mode 100644
index 054a0f3..0000000
--- a/log4j-samples/configuration/src/test/java/org/apache/logging/log4j/configuration/CustomConfigurationTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.configuration;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.junit.Test;
-
-/**
- *
- */
-public class CustomConfigurationTest {
-    private final Logger logger = LogManager.getLogger(CustomConfiguration.class);
-
-    @Test
-    public void testLogging() {
-        logger.error("This is a test");
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/.gitignore b/log4j-samples/flume-common/.gitignore
deleted file mode 100644
index 9f0fc21..0000000
--- a/log4j-samples/flume-common/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.settings/
-/target/
-/.classpath
-/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/pom.xml b/log4j-samples/flume-common/pom.xml
deleted file mode 100644
index 7643cb6..0000000
--- a/log4j-samples/flume-common/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>log4j-samples</artifactId>
-    <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.10.1-SNAPSHOT</version>
-  </parent>
-  <artifactId>log4j-samples-flume-common</artifactId>
-  <packaging>jar</packaging>
-  <name>Apache Log4j Samples: Flume - Common</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.ws</groupId>
-      <artifactId>spring-ws-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.8.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
deleted file mode 100755
index cc17609..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.app;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import org.apache.logging.log4j.EventLogger;
-import org.apache.logging.log4j.message.StructuredDataMessage;
-import org.apache.logging.log4j.samples.dto.AuditEvent;
-import org.apache.logging.log4j.samples.dto.Constraint;
-import org.apache.logging.log4j.samples.util.NamingUtils;
-
-/**
- *
- */
-public class LogEventFactory {
-
-    @SuppressWarnings("unchecked")
-    public static <T extends AuditEvent> T getEvent(final Class<T> intrface) {
-
-        final String eventId = NamingUtils.lowerFirst(intrface.getSimpleName());
-        final StructuredDataMessage msg = new StructuredDataMessage(eventId, null, "Audit");
-        return (T)Proxy.newProxyInstance(intrface
-            .getClassLoader(), new Class<?>[]{intrface}, new AuditProxy(msg, intrface));
-    }
-
-    private static class AuditProxy implements InvocationHandler {
-
-        private final StructuredDataMessage msg;
-        private final Class<?> intrface;
-
-        public AuditProxy(final StructuredDataMessage msg, final Class<?> intrface) {
-            this.msg = msg;
-            this.intrface = intrface;
-        }
-
-        @Override
-        public Object invoke(final Object o, final Method method, final Object[] objects)
-            throws Throwable {
-            if (method.getName().equals("logEvent")) {
-
-                final StringBuilder missing = new StringBuilder();
-
-                final Method[] methods = intrface.getMethods();
-
-                for (final Method _method : methods) {
-                    final String name = NamingUtils.lowerFirst(NamingUtils
-                        .getMethodShortName(_method.getName()));
-
-                    final Annotation[] annotations = _method.getDeclaredAnnotations();
-                    for (final Annotation annotation : annotations) {
-                        final Constraint constraint = (Constraint) annotation;
-
-                        if (constraint.required() && msg.get(name) == null) {
-                            if (missing.length() > 0) {
-                                missing.append(", ");
-                            }
-                            missing.append(name);
-                        }
-                    }
-                }
-
-                if (missing.length() > 0) {
-                    throw new IllegalStateException("Event " + msg.getId().getName() +
-                        " is missing required attributes " + missing);
-                }
-                EventLogger.logEvent(msg);
-            }
-            if (method.getName().equals("setCompletionStatus")) {
-                final String name = NamingUtils.lowerFirst(NamingUtils.getMethodShortName(method.getName()));
-                msg.put(name, objects[0].toString());
-            }
-            if (method.getName().startsWith("set")) {
-                final String name = NamingUtils.lowerFirst(NamingUtils.getMethodShortName(method.getName()));
-
-                /*
-                 * Perform any validation here. Currently the catalog doesn't
-                 * contain any information on validation rules.
-                 */
-                msg.put(name, objects[0].toString());
-            }
-
-            return null;
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
deleted file mode 100644
index 944082f..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.app;
-
-import java.util.List;
-import java.util.Random;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.ThreadContext;
-import org.apache.logging.log4j.samples.dto.AuditEvent;
-import org.apache.logging.log4j.samples.dto.RequestContext;
-
-
-/**
- * The Class LoggingApp.
- */
-public class LoggingApp {
-
-    /**
-     * The logger.
-     */
-    private static Logger logger = LogManager.getLogger(LoggingApp.class);
-
-    private final Random ran = new Random();
-
-    private List<AuditEvent> events;
-
-    public static void main(final String[] args) {
-        String member = "fakemember";
-        if (args.length == 1) {
-            member = args[0];
-        }
-        final LoggingApp app = new LoggingApp(member);
-        app.runApp(member);
-        System.out.println("Job ended");
-    }
-
-    public LoggingApp(final String member) {
-
-        ThreadContext.clearMap();
-
-        RequestContext.setSessionId("session1234");
-        RequestContext.setIpAddress("127.0.0.1");
-        RequestContext.setClientId("02121");
-        RequestContext.setProductName("IB");
-        RequestContext.setProductVersion("4.18.1");
-        RequestContext.setLocale("en_US");
-        RequestContext.setRegion("prod");
-
-        if (events == null) {
-            events = MockEventsSupplier.getAllEvents(member);
-        }
-    }
-
-    public void runApp(final String member) {
-        final Worker worker = new Worker(member);
-        worker.start();
-        sleep(30000);
-        worker.shutdown();
-        sleep(5000);
-    }
-
-    private void sleep(final long millis) {
-        try {
-            Thread.sleep(millis);
-        } catch (final InterruptedException ie) {
-            //
-        }
-    }
-
-
-    public class Worker extends Thread {
-
-        private final String member;
-
-        private boolean shutdown = false;
-
-        public Worker(final String member) {
-            this.member = member;
-        }
-
-        @Override
-        public void run() {
-            System.out.println("STARTING..................");
-
-            while (!shutdown) {
-                // Generate rand number between 1 to 10
-                final int rand = ran.nextInt(9) + 1;
-
-                // Sleep for rand seconds
-                try {
-                    Thread.sleep(rand * 1000);
-                } catch (final InterruptedException e) {
-                    logger.warn("WARN", e);
-                }
-
-                // Write rand number of logs
-                for (int i = 0; i < rand; i++) {
-                    final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
-                    final AuditEvent event = events.get(eventIndex);
-                    RequestContext.setUserId(member);
-                    event.logEvent();
-
-                    if ((rand % 4) == 1) {
-                        logger.debug("DEBUG level logging.....");
-                    } else if ((rand % 4) == 2) {
-                        logger.info("INFO level logging.....");
-                    } else if ((rand % 4) == 3) {
-                        logger.warn("WARN level logging.....");
-                    } else {
-                        logger.error("ERROR level logging.....");
-                    }
-                }
-
-            }
-        }
-
-        public void shutdown() {
-            this.shutdown = true;
-            try {
-                this.join();
-            } catch (final InterruptedException ie) {
-                //
-            }
-            System.out.println("SHUTDOWN.......................");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
deleted file mode 100755
index e77650a..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.app;
-
-import java.util.List;
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.ThreadContext;
-import org.apache.logging.log4j.samples.dto.AuditEvent;
-import org.apache.logging.log4j.samples.dto.RequestContext;
-import org.apache.logging.log4j.util.Strings;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.servlet.ModelAndView;
-
-
-/**
- * The Class LoggingController.
- */
-@Controller
-public class LoggingController {
-
-    /**
-     * The logger.
-     */
-    private static Logger logger = LogManager.getLogger(LoggingController.class);
-
-    private volatile boolean generateLog = false;
-    private final Random ran = new Random();
-
-    private List<AuditEvent> events;
-    private int timeBase = 1000;
-
-    @RequestMapping(value = "/start.do", method = RequestMethod.GET)
-    public ModelAndView startLogging(
-        @RequestParam(value = "member", required = false, defaultValue = "fakemember") final String member,
-        @RequestParam(value = "interval", required = false, defaultValue = "1000") final String interval,
-        @RequestParam(value = "threads", required = false, defaultValue = "1") final String threadCount,
-                      final HttpServletRequest servletRequest) {
-        int numThreads = 1;
-        if (Strings.isNotEmpty(threadCount)) {
-            try {
-                numThreads = Integer.parseInt(threadCount);
-            } catch (final Exception ex) {
-                System.out.println("Invalid threadCount specified: " + threadCount);
-            }
-        }
-        if (Strings.isNotEmpty(interval)) {
-            try {
-                timeBase = Integer.parseInt(interval);
-            } catch (final Exception ex) {
-                System.out.println("Invalid interval specified: " + interval);
-            }
-        }
-        System.out.println("STARTING - Using " + numThreads + " threads at interval: " + timeBase);
-
-        if (events == null) {
-            events = MockEventsSupplier.getAllEvents(member);
-        }
-
-        generateLog = true;
-
-        for (int i = 0; i < numThreads; ++i) {
-            (new Thread() {
-
-                @Override
-                public void run() {
-                    ThreadContext.clearMap();
-
-                    RequestContext.setSessionId("session1234");
-                    RequestContext.setIpAddress("127.0.0.1");
-                    RequestContext.setClientId("02121");
-                    RequestContext.setProductName("IB");
-                    RequestContext.setProductVersion("4.18.1");
-                    RequestContext.setLocale("en_US");
-                    RequestContext.setRegion("prod");
-                    while (generateLog) {
-                        // Generate rand number between 1 to 10
-                        final int rand = ran.nextInt(9) + 1;
-
-                        // Sleep for rand seconds
-                        try {
-                            Thread.sleep(rand * timeBase);
-                        } catch (final InterruptedException e) {
-                            logger.warn("WARN", e);
-                        }
-
-                        // Write rand number of logs
-                        for (int i = 0; i < rand; i++) {
-                            final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
-                            final AuditEvent event = events.get(eventIndex);
-                            RequestContext.setUserId(member);
-                            event.logEvent();
-
-                            if ((rand % 4) == 1) {
-                                logger.debug("DEBUG level logging.....");
-                            } else if ((rand % 4) == 2) {
-                                logger.info("INFO level logging.....");
-                            } else if ((rand % 4) == 3) {
-                                logger.warn("WARN level logging.....");
-                            } else {
-                                logger.error("ERROR level logging.....");
-                            }
-                        }
-
-                    }
-                    ThreadContext.cloneStack();
-                }
-            }).start();
-        }
-
-        return new ModelAndView("start.jsp");
-    }
-
-    @RequestMapping(value = "/stop.do", method = RequestMethod.GET)
-    public ModelAndView stopLogging(final HttpServletRequest servletRequest) {
-        generateLog = false;
-        return new ModelAndView("stop.jsp");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
deleted file mode 100755
index bdd64b4..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.app;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.logging.log4j.samples.dto.AuditEvent;
-import org.apache.logging.log4j.samples.events.Alert;
-import org.apache.logging.log4j.samples.events.ChangePassword;
-import org.apache.logging.log4j.samples.events.Login;
-import org.apache.logging.log4j.samples.events.ScheduledTransaction;
-import org.apache.logging.log4j.samples.events.Transfer;
-
-public class MockEventsSupplier {
-
-    /* This provides random generation */
-    static Random random = new Random();
-
-    public static List<AuditEvent> getAllEvents(final String member) {
-
-        final List<AuditEvent> events = new ArrayList<>();
-
-
-        final Login login = LogEventFactory.getEvent(Login.class);
-        login.setStartPageOption("account summary");
-        login.setSource("online");
-        login.setMember(member);
-        events.add(login);
-
-        final ChangePassword changePassword = LogEventFactory.getEvent(ChangePassword.class);
-        changePassword.setMember(member);
-        events.add(changePassword);
-
-        final Transfer transfer = LogEventFactory.getEvent(Transfer.class);
-
-        transfer.setAmount("4251");
-        transfer.setFromAccount("REPLACE"); // getAccount(mbr, accounts));
-        transfer.setToAccount("31142553");
-        transfer.setReference("DI-2415220110804");
-        transfer.setComment("My Transfer");
-        transfer.setMemo("For dinner");
-        transfer.setPayment("Use Checking");
-        transfer.setTransactionType("1");
-        transfer.setSource("IB Transfer page");
-        transfer.setCompletionStatus("complete");
-        transfer.setMember(member);
-        events.add(transfer);
-
-        final Alert alert = LogEventFactory.getEvent(Alert.class);
-
-        alert.setAction("add");
-        alert.setType("balance alert");
-        alert.setAccountNumber("REPLACE"); // , getAccount(mbr, accounts));
-        alert.setTrigger("GT");
-        alert.setThreshold("1000");
-        alert.setMember(member);
-        events.add(alert);
-
-        final ScheduledTransaction scheduledTransaction = LogEventFactory
-                .getEvent(ScheduledTransaction.class);
-
-        scheduledTransaction.setAction("add");
-        scheduledTransaction.setFromAccount("REPLACE"); // getAccount(mbr,
-                                                        // accounts));
-        scheduledTransaction.setToAccount("REPLACE"); // "9200000214");
-        scheduledTransaction.setAmount("2541");
-        scheduledTransaction.setStartDate("20110105");
-        scheduledTransaction.setMember("256");
-        scheduledTransaction.setFrequency("4");
-        scheduledTransaction.setMemo("Scheduled Transfer");
-        scheduledTransaction.setPayment("3456");
-        scheduledTransaction.setCompletionNotification("Was completed");
-        scheduledTransaction.setEndDate("2020-05-30");
-        scheduledTransaction.setSrtId("Calabasas2341");
-        scheduledTransaction.setSource("Home Page");
-        scheduledTransaction.setCompletionStatus("success");
-        scheduledTransaction.setMember(member);
-        events.add(scheduledTransaction);
-
-        return events;
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
deleted file mode 100755
index 67694e6..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/AuditEvent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.dto;
-
-/**
- * Interface that indicates the Class was generated by the DTOManager.
- */
-public interface AuditEvent {
-
-    void logEvent();
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
deleted file mode 100755
index c0e83cf..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.dto;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.logging.log4j.util.Strings;
-
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Constraint {
-
-    boolean required() default false;
-
-    String pattern() default Strings.EMPTY;
-
-    int minLength() default -1;
-
-    int maxLength() default -1;
-
-    int totalDigits() default -1;
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
deleted file mode 100644
index f7b6fc5..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/RequestContext.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.dto;
-
-import org.apache.logging.log4j.ThreadContext;
-import org.apache.logging.log4j.core.util.UuidUtil;
-
-/**
- *
- */
-public final class RequestContext {
-
-    private RequestContext() {
-    }
-    // Unique token to identify this request.
-    public static final String REQUEST_ID = "id";
-    // Token used to correlate multiple events within the request.
-    public static final String TRANSACTION_ID = "transId";
-    // The requested resource.
-    public static final String REQUEST_URI = "requestURI";
-    // Identify the user's session - should never contain the HTTP SessionId.
-    public static final String SESSION_ID = "sessionId";
-    // The id the user logged in with.
-    public static final String LOGIN_ID = "loginId";
-    // The id the system associates with the user.
-    public static final String USER_ID = "userId";
-    // user, admin, etc.
-    public static final String USER_TYPE = "userType";
-    // client id in a multi-tenant application
-    public static final String CLIENT_ID = "clientId";
-    // The user's ipAddress.
-    public static final String IP_ADDRESS = "ipAddress";
-    // The name of the product.
-    public static final String PRODUCT_NAME = "productName";
-    // The product version.
-    public static final String PRODUCT_VERSION = "productVersion";
-    // The users locale.
-    public static final String LOCALE = "locale";
-    // prod, preprod, beta, dev, etc.
-    public static final String REGION = "region";
-    // The user agent string from the browser.
-    public static final String USER_AGENT = "userAgent";
-
-    public static void initialize() {
-        ThreadContext.clearMap();
-        ThreadContext.put(REQUEST_ID, UuidUtil.getTimeBasedUuid().toString());
-    }
-
-    public static String getId() {
-        return ThreadContext.get(REQUEST_ID);
-    }
-
-    public static void setSessionId(final String id) {
-        ThreadContext.put(SESSION_ID, id);
-    }
-
-    public static String getSessionId() {
-        return ThreadContext.get(SESSION_ID);
-    }
-
-    public static void setTransId(final String id) {
-        ThreadContext.put(TRANSACTION_ID,  id);
-    }
-
-    public static String getTransId() {
-        return ThreadContext.get(TRANSACTION_ID);
-    }
-
-    public static void setRequestURI(final String URI) {
-        ThreadContext.put(REQUEST_URI,  URI);
-    }
-
-    public static String getRequestURI() {
-        return ThreadContext.get(REQUEST_URI);
-    }
-
-    public static void setLoginId(final String id) {
-        ThreadContext.put(LOGIN_ID,  id);
-    }
-
-    public static String getLoginId() {
-        return ThreadContext.get(LOGIN_ID);
-    }
-
-    public static void setUserId(final String id) {
-        ThreadContext.put(USER_ID,  id);
-    }
-
-    public static String getUserId() {
-        return ThreadContext.get(USER_ID);
-    }
-
-    public static void setUserType(final String type) {
-        ThreadContext.put(USER_TYPE,  type);
-    }
-
-    public static String getUserType() {
-        return ThreadContext.get(USER_TYPE);
-    }
-
-    public static void setClientId(final String id) {
-        ThreadContext.put(CLIENT_ID,  id);
-    }
-
-    public static String getClientId() {
-        return ThreadContext.get(CLIENT_ID);
-    }
-
-    public static void setIpAddress(final String addr) {
-        ThreadContext.put(IP_ADDRESS,  addr);
-    }
-
-    public static String getIpAddress() {
-        return ThreadContext.get(IP_ADDRESS);
-    }
-
-    public static void setProductName(final String productName) {
-        ThreadContext.put(PRODUCT_NAME, productName);
-    }
-
-    public static String getProductName() {
-        return ThreadContext.get(PRODUCT_NAME);
-    }
-
-
-    public static void setProductVersion(final String productVersion) {
-        ThreadContext.put(PRODUCT_VERSION, productVersion);
-    }
-
-    public static String getProductVersion() {
-        return ThreadContext.get(PRODUCT_VERSION);
-    }
-
-    public static void setLocale(final String locale) {
-        ThreadContext.put(LOCALE, locale);
-    }
-
-    public static String getLocale() {
-        return ThreadContext.get(LOCALE);
-    }
-
-    public static void setRegion(final String region) {
-        ThreadContext.put(REGION, region);
-    }
-
-    public static String getRegion() {
-        return ThreadContext.get(REGION);
-    }
-
-    public static void setUserAgent(final String agent) {
-        ThreadContext.put(USER_AGENT, agent);
-    }
-
-    public static String getUserAgent() {
-        return ThreadContext.get(USER_AGENT);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
deleted file mode 100755
index 532519f..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.events;
-
-import org.apache.logging.log4j.samples.dto.Constraint;
-
-/**
- * The user sets up account balance alerts.
- */
-
-public interface Alert extends org.apache.logging.log4j.samples.dto.AuditEvent {
-
-    /**
-     * Account Number : Account number
-     *
-     * @param accountNumber Account number
-     */
-    @Constraint(required = true)
-    void setAccountNumber(String accountNumber);
-
-    /**
-     * Action : Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel, Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
-     *
-     * @param action Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel, Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
-     */
-    void setAction(String action);
-
-    /**
-     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
-     *
-     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
-     */
-    void setCompletionStatus(String completionStatus);
-
-    /**
-     * Member : Member or End User number at the Host
-     *
-     * @param member Member or End User number at the Host
-     */
-    @Constraint(required = true)
-    void setMember(String member);
-
-    /**
-     * Threshold : Balance alert, the amount to compare against the balance in the case of a balance alert.  Check cleared alert, there is no value.  for maturity date alert, there is no value.  Loan payment due alert, there is no value.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this date is the Start Date that the alert will begin to be sent on.
-     *
-     * @param threshold Balance alert, the amount to compare against the balance in the case of a balance alert.  Check cleared alert, there is no value.  for maturity date alert, there is no value.  Loan payment due alert, there is no value.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this date is the Start Date that the alert will begin to be sent on.
-     */
-    void setThreshold(String threshold);
-
-    /**
-     * Trigger : Balance alert, the value is an operator ('GT' for Greater Than or 'LT' for Less Than).  Check alert, this value is the check number.  Maturity date alert, the value is the number of days prior to maturity.  Loan payment due alert, the value is the number of days prior to payment due date.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this text is the frequency that the alert will be sent.
-     *
-     * @param trigger Balance alert, the value is an operator ('GT' for Greater Than or 'LT' for Less Than).  Check alert, this value is the check number.  Maturity date alert, the value is the number of days prior to maturity.  Loan payment due alert, the value is the number of days prior to payment due date.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this text is the frequency that the alert will be sent.
-     */
-    void setTrigger(String trigger);
-
-    /**
-     * Type : Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
-     *
-     * @param type Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
-     */
-    @Constraint(required = true)
-    void setType(String type);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
deleted file mode 100755
index 6f725db..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.events;
-
-import org.apache.logging.log4j.samples.dto.Constraint;
-
-/**
- * Member change their password.
- */
-
-public interface ChangePassword extends org.apache.logging.log4j.samples.dto.AuditEvent {
-
-    /**
-     * Member : Member or End User number at the Host
-     *
-     * @param member Member or End User number at the Host
-     */
-    @Constraint(required = true)
-    void setMember(String member);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
deleted file mode 100755
index 4cb2d33..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.events;
-
-/**
- * Member logged in successfully.
- */
-
-public interface Login extends org.apache.logging.log4j.samples.dto.AuditEvent {
-
-    /**
-     * Member : Member or End User number at the Host
-     *
-     * @param member Member or End User number at the Host
-     */
-    void setMember(String member);
-
-    /**
-     * Source : Source of the End User's request; or method user used to navigate (link, button)
-     *
-     * @param source Source of the End User's request; or method user used to navigate (link, button)
-     */
-    void setSource(String source);
-
-    /**
-     * Start Page Option : Chosen start page destination for IB login.
-     *
-     * @param startPageOption Chosen start page destination for IB login.
-     */
-    void setStartPageOption(String startPageOption);
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
deleted file mode 100755
index e231f28..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.events;
-
-/**
- * Member set up scheduled transaction request.
- */
-
-public interface ScheduledTransaction extends org.apache.logging.log4j.samples.dto.AuditEvent {
-
-    /**
-     * Action : Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel,
-     * Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select,
-     * Duplicate user.  Alternatively, the action the user has executed in the event
-     *
-     * @param action Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel,
-     *               Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit,
-     *               account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
-     */
-    void setAction(String action);
-
-    /**
-     * Amount : Amount of transaction in dollars.
-     *
-     * @param amount Amount of transaction in dollars.
-     */
-    void setAmount(String amount);
-
-    /**
-     * Completion Notification : Completion notification
-     *
-     * @param completionNotification Completion notification
-     */
-    void setCompletionNotification(String completionNotification);
-
-    /**
-     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
-     *
-     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
-     */
-    void setCompletionStatus(String completionStatus);
-
-    /**
-     * End Date : Final date for scheduled recurring transfers or PFM history request.
-     *
-     * @param endDate Final date for scheduled recurring transfers or PFM history request.
-     */
-    void setEndDate(String endDate);
-
-    /**
-     * Frequency : For recurring transactions, payments, the frequency (monthly, weekly) of execution.
-     *
-     * @param frequency For recurring transactions, payments, the frequency (monthly, weekly) of execution.
-     */
-    void setFrequency(String frequency);
-
-    /**
-     * From Account : For transfer or other transaction, the account funds are taken from.
-     *
-     * @param fromAccount For transfer or other transaction, the account funds are taken from.
-     */
-    void setFromAccount(String fromAccount);
-
-    /**
-     * Member : Member or End User number at the Host
-     *
-     * @param member Member or End User number at the Host
-     */
-    void setMember(String member);
-
-    /**
-     * Memo : Descriptive text or memo for transaction
-     *
-     * @param memo Descriptive text or memo for transaction
-     */
-    void setMemo(String memo);
-
-    /**
-     * Payment : Amount paid or transferred.
-     *
-     * @param payment Amount paid or transferred.
-     */
-    void setPayment(String payment);
-
-    /**
-     * Source : Source of the End User's request; or method user used to navigate (link, button)
-     *
-     * @param source Source of the End User's request; or method user used to navigate (link, button)
-     */
-    void setSource(String source);
-
-    /**
-     * SRT Identifier : Scheduled Recurring Transaction Identifier
-     *
-     * @param srtId Scheduled Recurring Transaction Identifier
-     */
-    void setSrtId(String srtId);
-
-    /**
-     * Start Date : Start date for Scheduled transfers/alerts or PFM history.
-     *
-     * @param startDate Start date for Scheduled transfers/alerts or PFM history.
-     */
-    void setStartDate(String startDate);
-
-    /**
-     * To Account : Target account or account that will receive funds in a transfer.
-     *
-     * @param toAccount Target account or account that will receive funds in a transfer.
-     */
-    void setToAccount(String toAccount);
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
deleted file mode 100755
index 13e5764..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.events;
-
-import org.apache.logging.log4j.samples.dto.Constraint;
-
-/**
- * Member requested transfer.
- */
-
-public interface Transfer extends org.apache.logging.log4j.samples.dto.AuditEvent {
-
-    /**
-     * Amount : Amount of transaction in dollars.
-     *
-     * @param amount Amount of transaction in dollars.
-     */
-    @Constraint(required = true)
-    void setAmount(String amount);
-
-    /**
-     * Comment : Comment
-     *
-     * @param comment Comment
-     */
-    void setComment(String comment);
-
-    /**
-     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
-     *
-     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
-     */
-    void setCompletionStatus(String completionStatus);
-
-    /**
-     * Confirmation Number : A date, time, and reference number.
-     *
-     * @param confNo A date, time, and reference number.
-     */
-    void setConfNo(String confNo);
-
-    /**
-     * From Account : For transfer or other transaction, the account funds are taken from.
-     *
-     * @param fromAccount For transfer or other transaction, the account funds are taken from.
-     */
-    @Constraint(required = true)
-    void setFromAccount(String fromAccount);
-
-    /**
-     * From Account Type : For transfer or other transaction, the type of the account funds are taken from.
-     *
-     * @param fromAccountType For transfer or other transaction, the type of the account funds are taken from.
-     */
-    void setFromAccountType(String fromAccountType);
-
-    /**
-     * From Routing Number : nine digit bank code to ID the FI from which funds are taken
-     *
-     * @param fromRoutingNumber nine digit bank code to ID the FI from which funds are taken
-     */
-    void setFromRoutingNumber(String fromRoutingNumber);
-
-    /**
-     * Member : Member or End User number at the Host
-     *
-     * @param member Member or End User number at the Host
-     */
-    @Constraint(required = true)
-    void setMember(String member);
-
-    /**
-     * Memo : Descriptive text or memo for transaction
-     *
-     * @param memo Descriptive text or memo for transaction
-     */
-    void setMemo(String memo);
-
-    /**
-     * Payment : Amount paid or transferred.
-     *
-     * @param payment Amount paid or transferred.
-     */
-    void setPayment(String payment);
-
-    /**
-     * Reference : Unique reference number or identifier for transfers.
-     *
-     * @param reference Unique reference number or identifier for transfers.
-     */
-    void setReference(String reference);
-
-    /**
-     * Result : Status of request event.
-     *
-     * @param result Status of request event.
-     */
-    void setResult(String result);
-
-    /**
-     * Source : Source of the End User's request; or method user used to navigate (link, button)
-     *
-     * @param source Source of the End User's request; or method user used to navigate (link, button)
-     */
-    void setSource(String source);
-
-    /**
-     * Status : Status of promotional email preference or online statement.
-     *
-     * @param status Status of promotional email preference or online statement.
-     */
-    void setStatus(String status);
-
-    /**
-     * Time Stamp : Time Stamp of event.
-     *
-     * @param timeStamp Time Stamp of event.
-     */
-    void setTimeStamp(long timeStamp);
-
-    /**
-     * To Account : Target account or account that will receive funds in a transfer.
-     *
-     * @param toAccount Target account or account that will receive funds in a transfer.
-     */
-    @Constraint(required = true)
-    void setToAccount(String toAccount);
-
-    /**
-     * To Account Type : Target account type such as savings or checking.
-     *
-     * @param toAccountType Target account type such as savings or checking.
-     */
-    void setToAccountType(String toAccountType);
-
-    /**
-     * To Routing Number : nine digit bank code to ID the FI to receive funds
-     *
-     * @param toRoutingNumber nine digit bank code to ID the FI to receive funds
-     */
-    void setToRoutingNumber(String toRoutingNumber);
-
-    /**
-     * Transaction Type : Type of transfer, i.e., withdrawal, LOC Paydown, CD redemption, lucky transfer.
-     *
-     * @param transactionType Type of transfer, i.e., withdrawal, LOC Paydown, CD redemption, lucky transfer.
-     */
-    void setTransactionType(String transactionType);
-
-    /**
-     * Type : Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
-     *
-     * @param type Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
-     */
-    void setType(String type);
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java b/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
deleted file mode 100755
index fea7163..0000000
--- a/log4j-samples/flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.samples.util;
-
-import org.apache.logging.log4j.util.Strings;
-
-public class NamingUtils {
-
-    public static String getPackageName(final String className) {
-        return className.substring(0, className.lastIndexOf("."));
-    }
-
-    public static String getSimpleName(final String className) {
-        return className.substring(className.lastIndexOf(".") + 1);
-    }
-
-    public static String getMethodShortName(final String name) {
-        return name.replaceFirst("(get|set|is|has)", Strings.EMPTY);
-    }
-
-    public static String upperFirst(final String name) {
-        return String.valueOf(name.charAt(0)).toUpperCase() + name.substring(1);
-    }
-
-    public static String lowerFirst(final String name) {
-        return String.valueOf(name.charAt(0)).toLowerCase() + name.substring(1);
-    }
-
-    public static String getSetterName(final String fieldName) {
-        return "set" + upperFirst(fieldName);
-    }
-
-    public static String getGetterName(final String fieldName, final String type) {
-        return ("boolean".equals(type) ? "is" : "get") + upperFirst(fieldName);
-    }
-
-    public static void main(final String[] args) {
-        final String blah = "com.test.generator.Classname";
-        System.out.println(getSimpleName(blah));
-        System.out.println(lowerFirst(getSimpleName(blah)));
-
-        System.out.println(getPackageName(blah));
-
-        System.out.println(getMethodShortName("getName"));
-        System.out.println(getMethodShortName("setName"));
-    }
-
-    public static String getClassName(final String className) {
-        return upperFirst(className.replaceAll("[^a-zA-Z0-9_]+", Strings.EMPTY));
-    }
-
-    public static String getFieldName(final String fieldName) {
-        return fieldName.replaceAll("[^a-zA-Z0-9_]+", Strings.EMPTY);
-    }
-
-    public static String methodCaseName(final String variable) {
-        return variable.substring(0, 1).toUpperCase() + variable.substring(1);
-    }
-
-    public static String getAccessorName(final String type, final String methodName) {
-        String prefix = "get";
-        if (type.equals("boolean")) {
-            prefix = "is";
-        }
-        return prefix + methodCaseName(methodName);
-    }
-
-    public static String getMutatorName(final String methodName) {
-        return "set" + methodCaseName(methodName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/.gitignore b/log4j-samples/flume-embedded/.gitignore
deleted file mode 100644
index 9f0fc21..0000000
--- a/log4j-samples/flume-embedded/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.settings/
-/target/
-/.classpath
-/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/README.txt
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/README.txt b/log4j-samples/flume-embedded/README.txt
deleted file mode 100644
index 081afe2..0000000
--- a/log4j-samples/flume-embedded/README.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Sample to utilize an embedded Flume agent to connect to a remote Flume Agent via Avro.
-
-This sample uses the classes in the sample flume-common project. It will randomly pick from the events defined there
-and send them to Flume. At the same time it will intermix some random non-audit events.
-
-To run this sample:
-1. Run "mvn install" on the flume-common project.
-2. Download and install Flume.
-3. Copy the flume-conf.properties in src/main/resources/flume/conf to the conf directory of where Flume was installed.
-4. In a terminal window start flume using "bin/flume-ng agent --conf ./conf/ -f conf/flume-conf.properties -Dflume.root.logger=DEBUG,console -n agent"
-5. Verify Flume started and configured an Avro source, a memory channel and a logger sink by reviewing the startup log.
-6. In a separate terminal window run "mvn jetty:run" in this project.
-7. Verify the Flume appender connected to the Flume agent by finding "Started SelectChannelConnector@0.0.0.0:8080"
-   in the jetty log and that there are no exceptions and also by seeing something like
-    "/127.0.0.1:53351 => /127.0.0.1:8800] OPEN" in the Flume log.
-8. In a separate terminal window in the project directory run "tail -f target/logs/app.log" to see the application
-   generate non-audit logs.
-9. In the browser go to url "http://localhost:8080/flumeAgent/start.do". A started message should appear on the screen.
-10. After verifying logs are being written click on the Stop button in the browser page.
-
-The output from the Flume agent will include the generated Flume events. Since the events are sent by the embedded
-Flume agent in a batch the Flume agent will only print a hex dump of the first few bytes of the event.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/pom.xml b/log4j-samples/flume-embedded/pom.xml
deleted file mode 100644
index 5c325ea..0000000
--- a/log4j-samples/flume-embedded/pom.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>log4j-samples</artifactId>
-    <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.10.1-SNAPSHOT</version>
-  </parent>
-  <artifactId>log4j-samples-flume-embedded</artifactId>
-  <packaging>war</packaging>
-  <name>Apache Log4j Samples: Flume - Embedded</name>
-  <url>http://maven.apache.org</url>
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.logging.log4j.samples</groupId>
-      <artifactId>log4j-samples-flume-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-flume-ng</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.flume</groupId>
-      <artifactId>flume-ng-node</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.flume.flume-ng-channels</groupId>
-      <artifactId>flume-file-channel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.ws</groupId>
-      <artifactId>spring-ws-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <resources>
-      <resource>
-        <directory>../../src/main/resources</directory>
-      </resource>
-      <resource>
-        <directory>../../src/main/webapp/WEB-INF</directory>
-        <includes>
-          <include>web.xml</include>
-        </includes>
-        <filtering>true</filtering>
-        <targetPath>${project.build.directory}</targetPath>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>2.5.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.4</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>maven-jetty-plugin</artifactId>
-        <version>6.1.10</version>
-        <configuration>
-          <contextPath>flumeAgent</contextPath>
-          <webXml>${project.build.directory}/web.xml</webXml>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-          <stopKey>foo</stopKey>
-          <stopPort>9999</stopPort>
-          <systemProperties>
-            <systemProperty>
-              <name>log.dir</name>
-              <value>${project.build.directory}/logs</value>
-            </systemProperty>
-          </systemProperties>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.8.2</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/flume-embedded/src/main/resources/flume/conf/flume-conf.properties
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/src/main/resources/flume/conf/flume-conf.properties b/log4j-samples/flume-embedded/src/main/resources/flume/conf/flume-conf.properties
deleted file mode 100644
index 9cbbfde..0000000
--- a/log4j-samples/flume-embedded/src/main/resources/flume/conf/flume-conf.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-# The configuration file needs to define the sources,
-# the channels and the sinks.
-# Sources, channels and sinks are defined per agent,
-# in this case called 'agent'
-
-agent.sources = avroSrc
-agent.channels = memoryChannel
-agent.sinks =  loggerSink
-
-# For each one of the sources, the type is defined
-# agent.sources.seqGenSrc.type = seq
-
-agent.sources.avroSrc.type = avro
-agent.sources.avroSrc.bind = localhost
-agent.sources.avroSrc.port = 8800
-
-# The channel can be defined as follows.
-agent.sources.avroSrc.channels = memoryChannel
-
-# Each sink's type must be defined
-agent.sinks.loggerSink.type = logger
-
-#Specify the channel the sink should use
-agent.sinks.loggerSink.channel = memoryChannel
-
-# Each channel's type is defined.
-agent.channels.memoryChannel.type = memory
-
-# Other config values specific to each type of channel(sink or source)
-# can be defined as well
-# In this case, it specifies the capacity of the memory channel
-agent.channels.memoryChannel.capacity = 100


[2/4] logging-log4j2 git commit: Log4j samples folder names should match artifact IDs.

Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
new file mode 100755
index 0000000..532519f
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Alert.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.events;
+
+import org.apache.logging.log4j.samples.dto.Constraint;
+
+/**
+ * The user sets up account balance alerts.
+ */
+
+public interface Alert extends org.apache.logging.log4j.samples.dto.AuditEvent {
+
+    /**
+     * Account Number : Account number
+     *
+     * @param accountNumber Account number
+     */
+    @Constraint(required = true)
+    void setAccountNumber(String accountNumber);
+
+    /**
+     * Action : Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel, Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
+     *
+     * @param action Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel, Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
+     */
+    void setAction(String action);
+
+    /**
+     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
+     *
+     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
+     */
+    void setCompletionStatus(String completionStatus);
+
+    /**
+     * Member : Member or End User number at the Host
+     *
+     * @param member Member or End User number at the Host
+     */
+    @Constraint(required = true)
+    void setMember(String member);
+
+    /**
+     * Threshold : Balance alert, the amount to compare against the balance in the case of a balance alert.  Check cleared alert, there is no value.  for maturity date alert, there is no value.  Loan payment due alert, there is no value.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this date is the Start Date that the alert will begin to be sent on.
+     *
+     * @param threshold Balance alert, the amount to compare against the balance in the case of a balance alert.  Check cleared alert, there is no value.  for maturity date alert, there is no value.  Loan payment due alert, there is no value.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this date is the Start Date that the alert will begin to be sent on.
+     */
+    void setThreshold(String threshold);
+
+    /**
+     * Trigger : Balance alert, the value is an operator ('GT' for Greater Than or 'LT' for Less Than).  Check alert, this value is the check number.  Maturity date alert, the value is the number of days prior to maturity.  Loan payment due alert, the value is the number of days prior to payment due date.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this text is the frequency that the alert will be sent.
+     *
+     * @param trigger Balance alert, the value is an operator ('GT' for Greater Than or 'LT' for Less Than).  Check alert, this value is the check number.  Maturity date alert, the value is the number of days prior to maturity.  Loan payment due alert, the value is the number of days prior to payment due date.  Loan payment past due alert, there is no value.  Personal reminder and periodic balance alerts, this text is the frequency that the alert will be sent.
+     */
+    void setTrigger(String trigger);
+
+    /**
+     * Type : Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
+     *
+     * @param type Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
+     */
+    @Constraint(required = true)
+    void setType(String type);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
new file mode 100755
index 0000000..6f725db
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ChangePassword.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.events;
+
+import org.apache.logging.log4j.samples.dto.Constraint;
+
+/**
+ * Member change their password.
+ */
+
+public interface ChangePassword extends org.apache.logging.log4j.samples.dto.AuditEvent {
+
+    /**
+     * Member : Member or End User number at the Host
+     *
+     * @param member Member or End User number at the Host
+     */
+    @Constraint(required = true)
+    void setMember(String member);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
new file mode 100755
index 0000000..4cb2d33
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Login.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.events;
+
+/**
+ * Member logged in successfully.
+ */
+
+public interface Login extends org.apache.logging.log4j.samples.dto.AuditEvent {
+
+    /**
+     * Member : Member or End User number at the Host
+     *
+     * @param member Member or End User number at the Host
+     */
+    void setMember(String member);
+
+    /**
+     * Source : Source of the End User's request; or method user used to navigate (link, button)
+     *
+     * @param source Source of the End User's request; or method user used to navigate (link, button)
+     */
+    void setSource(String source);
+
+    /**
+     * Start Page Option : Chosen start page destination for IB login.
+     *
+     * @param startPageOption Chosen start page destination for IB login.
+     */
+    void setStartPageOption(String startPageOption);
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
new file mode 100755
index 0000000..e231f28
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/ScheduledTransaction.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.events;
+
+/**
+ * Member set up scheduled transaction request.
+ */
+
+public interface ScheduledTransaction extends org.apache.logging.log4j.samples.dto.AuditEvent {
+
+    /**
+     * Action : Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel,
+     * Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit, account auto-Select,
+     * Duplicate user.  Alternatively, the action the user has executed in the event
+     *
+     * @param action Indicates the step of the registration process.  Valid actions are: Begin, Submit, Enroll Cancel,
+     *               Confirm Page, Rt In Process Attempt, Reg submitted, acct del, Account del submit,
+     *               account auto-Select, Duplicate user.  Alternatively, the action the user has executed in the event
+     */
+    void setAction(String action);
+
+    /**
+     * Amount : Amount of transaction in dollars.
+     *
+     * @param amount Amount of transaction in dollars.
+     */
+    void setAmount(String amount);
+
+    /**
+     * Completion Notification : Completion notification
+     *
+     * @param completionNotification Completion notification
+     */
+    void setCompletionNotification(String completionNotification);
+
+    /**
+     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
+     *
+     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
+     */
+    void setCompletionStatus(String completionStatus);
+
+    /**
+     * End Date : Final date for scheduled recurring transfers or PFM history request.
+     *
+     * @param endDate Final date for scheduled recurring transfers or PFM history request.
+     */
+    void setEndDate(String endDate);
+
+    /**
+     * Frequency : For recurring transactions, payments, the frequency (monthly, weekly) of execution.
+     *
+     * @param frequency For recurring transactions, payments, the frequency (monthly, weekly) of execution.
+     */
+    void setFrequency(String frequency);
+
+    /**
+     * From Account : For transfer or other transaction, the account funds are taken from.
+     *
+     * @param fromAccount For transfer or other transaction, the account funds are taken from.
+     */
+    void setFromAccount(String fromAccount);
+
+    /**
+     * Member : Member or End User number at the Host
+     *
+     * @param member Member or End User number at the Host
+     */
+    void setMember(String member);
+
+    /**
+     * Memo : Descriptive text or memo for transaction
+     *
+     * @param memo Descriptive text or memo for transaction
+     */
+    void setMemo(String memo);
+
+    /**
+     * Payment : Amount paid or transferred.
+     *
+     * @param payment Amount paid or transferred.
+     */
+    void setPayment(String payment);
+
+    /**
+     * Source : Source of the End User's request; or method user used to navigate (link, button)
+     *
+     * @param source Source of the End User's request; or method user used to navigate (link, button)
+     */
+    void setSource(String source);
+
+    /**
+     * SRT Identifier : Scheduled Recurring Transaction Identifier
+     *
+     * @param srtId Scheduled Recurring Transaction Identifier
+     */
+    void setSrtId(String srtId);
+
+    /**
+     * Start Date : Start date for Scheduled transfers/alerts or PFM history.
+     *
+     * @param startDate Start date for Scheduled transfers/alerts or PFM history.
+     */
+    void setStartDate(String startDate);
+
+    /**
+     * To Account : Target account or account that will receive funds in a transfer.
+     *
+     * @param toAccount Target account or account that will receive funds in a transfer.
+     */
+    void setToAccount(String toAccount);
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
new file mode 100755
index 0000000..13e5764
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/events/Transfer.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.events;
+
+import org.apache.logging.log4j.samples.dto.Constraint;
+
+/**
+ * Member requested transfer.
+ */
+
+public interface Transfer extends org.apache.logging.log4j.samples.dto.AuditEvent {
+
+    /**
+     * Amount : Amount of transaction in dollars.
+     *
+     * @param amount Amount of transaction in dollars.
+     */
+    @Constraint(required = true)
+    void setAmount(String amount);
+
+    /**
+     * Comment : Comment
+     *
+     * @param comment Comment
+     */
+    void setComment(String comment);
+
+    /**
+     * Completion Status : Whether the event succeeded or failed - success/failure and optional reason.
+     *
+     * @param completionStatus Whether the event succeeded or failed - success/failure and optional reason.
+     */
+    void setCompletionStatus(String completionStatus);
+
+    /**
+     * Confirmation Number : A date, time, and reference number.
+     *
+     * @param confNo A date, time, and reference number.
+     */
+    void setConfNo(String confNo);
+
+    /**
+     * From Account : For transfer or other transaction, the account funds are taken from.
+     *
+     * @param fromAccount For transfer or other transaction, the account funds are taken from.
+     */
+    @Constraint(required = true)
+    void setFromAccount(String fromAccount);
+
+    /**
+     * From Account Type : For transfer or other transaction, the type of the account funds are taken from.
+     *
+     * @param fromAccountType For transfer or other transaction, the type of the account funds are taken from.
+     */
+    void setFromAccountType(String fromAccountType);
+
+    /**
+     * From Routing Number : nine digit bank code to ID the FI from which funds are taken
+     *
+     * @param fromRoutingNumber nine digit bank code to ID the FI from which funds are taken
+     */
+    void setFromRoutingNumber(String fromRoutingNumber);
+
+    /**
+     * Member : Member or End User number at the Host
+     *
+     * @param member Member or End User number at the Host
+     */
+    @Constraint(required = true)
+    void setMember(String member);
+
+    /**
+     * Memo : Descriptive text or memo for transaction
+     *
+     * @param memo Descriptive text or memo for transaction
+     */
+    void setMemo(String memo);
+
+    /**
+     * Payment : Amount paid or transferred.
+     *
+     * @param payment Amount paid or transferred.
+     */
+    void setPayment(String payment);
+
+    /**
+     * Reference : Unique reference number or identifier for transfers.
+     *
+     * @param reference Unique reference number or identifier for transfers.
+     */
+    void setReference(String reference);
+
+    /**
+     * Result : Status of request event.
+     *
+     * @param result Status of request event.
+     */
+    void setResult(String result);
+
+    /**
+     * Source : Source of the End User's request; or method user used to navigate (link, button)
+     *
+     * @param source Source of the End User's request; or method user used to navigate (link, button)
+     */
+    void setSource(String source);
+
+    /**
+     * Status : Status of promotional email preference or online statement.
+     *
+     * @param status Status of promotional email preference or online statement.
+     */
+    void setStatus(String status);
+
+    /**
+     * Time Stamp : Time Stamp of event.
+     *
+     * @param timeStamp Time Stamp of event.
+     */
+    void setTimeStamp(long timeStamp);
+
+    /**
+     * To Account : Target account or account that will receive funds in a transfer.
+     *
+     * @param toAccount Target account or account that will receive funds in a transfer.
+     */
+    @Constraint(required = true)
+    void setToAccount(String toAccount);
+
+    /**
+     * To Account Type : Target account type such as savings or checking.
+     *
+     * @param toAccountType Target account type such as savings or checking.
+     */
+    void setToAccountType(String toAccountType);
+
+    /**
+     * To Routing Number : nine digit bank code to ID the FI to receive funds
+     *
+     * @param toRoutingNumber nine digit bank code to ID the FI to receive funds
+     */
+    void setToRoutingNumber(String toRoutingNumber);
+
+    /**
+     * Transaction Type : Type of transfer, i.e., withdrawal, LOC Paydown, CD redemption, lucky transfer.
+     *
+     * @param transactionType Type of transfer, i.e., withdrawal, LOC Paydown, CD redemption, lucky transfer.
+     */
+    void setTransactionType(String transactionType);
+
+    /**
+     * Type : Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
+     *
+     * @param type Type of event, bill payment, balance, application, or attribute. For bill pay, type of payment (check, electronic)
+     */
+    void setType(String type);
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
new file mode 100755
index 0000000..f6552fb
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-common/src/main/java/org/apache/logging/log4j/samples/util/NamingUtils.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.samples.util;
+
+import org.apache.logging.log4j.util.Strings;
+
+public class NamingUtils {
+
+    public static String getPackageName(final String className) {
+        return className.substring(0, className.lastIndexOf("."));
+    }
+
+    public static String getSimpleName(final String className) {
+        return className.substring(className.lastIndexOf(".") + 1);
+    }
+
+    public static String getMethodShortName(final String name) {
+        return name.replaceFirst("(get|set|is|has)", Strings.EMPTY);
+    }
+
+    public static String upperFirst(final String name) {
+        return String.valueOf(name.charAt(0)).toUpperCase() + name.substring(1);
+    }
+
+    public static String lowerFirst(final String name) {
+        return String.valueOf(name.charAt(0)).toLowerCase() + name.substring(1);
+    }
+
+    public static String getSetterName(final String fieldName) {
+        return "set" + upperFirst(fieldName);
+    }
+
+    public static String getGetterName(final String fieldName, final String type) {
+        return ("boolean".equals(type) ? "is" : "get") + upperFirst(fieldName);
+    }
+
+    public static void main(final String[] args) {
+        final String blah = "com.test.generator.Classname";
+        System.out.println(getSimpleName(blah));
+        System.out.println(lowerFirst(getSimpleName(blah)));
+
+        System.out.println(getPackageName(blah));
+
+        System.out.println(getMethodShortName("getName"));
+        System.out.println(getMethodShortName("setName"));
+    }
+
+    public static String getClassName(final String className) {
+        return upperFirst(className.replaceAll("[^a-zA-Z0-9_]+", Strings.EMPTY));
+    }
+
+    public static String getFieldName(final String fieldName) {
+        return fieldName.replaceAll("[^a-zA-Z0-9_]+", Strings.EMPTY);
+    }
+
+    public static String methodCaseName(final String variable) {
+        return variable.substring(0, 1).toUpperCase() + variable.substring(1);
+    }
+
+    public static String getAccessorName(final String type, final String methodName) {
+        String prefix = "get";
+        if (type.equals("boolean")) {
+            prefix = "is";
+        }
+        return prefix + methodCaseName(methodName);
+    }
+
+    public static String getMutatorName(final String methodName) {
+        return "set" + methodCaseName(methodName);
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/.gitignore b/log4j-samples/log4j-samples-flume-embedded/.gitignore
new file mode 100644
index 0000000..9f0fc21
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/.gitignore
@@ -0,0 +1,4 @@
+/.settings/
+/target/
+/.classpath
+/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/README.txt
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/README.txt b/log4j-samples/log4j-samples-flume-embedded/README.txt
new file mode 100644
index 0000000..081afe2
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/README.txt
@@ -0,0 +1,22 @@
+Sample to utilize an embedded Flume agent to connect to a remote Flume Agent via Avro.
+
+This sample uses the classes in the sample flume-common project. It will randomly pick from the events defined there
+and send them to Flume. At the same time it will intermix some random non-audit events.
+
+To run this sample:
+1. Run "mvn install" on the flume-common project.
+2. Download and install Flume.
+3. Copy the flume-conf.properties in src/main/resources/flume/conf to the conf directory of where Flume was installed.
+4. In a terminal window start flume using "bin/flume-ng agent --conf ./conf/ -f conf/flume-conf.properties -Dflume.root.logger=DEBUG,console -n agent"
+5. Verify Flume started and configured an Avro source, a memory channel and a logger sink by reviewing the startup log.
+6. In a separate terminal window run "mvn jetty:run" in this project.
+7. Verify the Flume appender connected to the Flume agent by finding "Started SelectChannelConnector@0.0.0.0:8080"
+   in the jetty log and that there are no exceptions and also by seeing something like
+    "/127.0.0.1:53351 => /127.0.0.1:8800] OPEN" in the Flume log.
+8. In a separate terminal window in the project directory run "tail -f target/logs/app.log" to see the application
+   generate non-audit logs.
+9. In the browser go to url "http://localhost:8080/flumeAgent/start.do". A started message should appear on the screen.
+10. After verifying logs are being written click on the Stop button in the browser page.
+
+The output from the Flume agent will include the generated Flume events. Since the events are sent by the embedded
+Flume agent in a batch the Flume agent will only print a hex dump of the first few bytes of the event.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/pom.xml b/log4j-samples/log4j-samples-flume-embedded/pom.xml
new file mode 100644
index 0000000..5c325ea
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/pom.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>log4j-samples</artifactId>
+    <groupId>org.apache.logging.log4j.samples</groupId>
+    <version>2.10.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>log4j-samples-flume-embedded</artifactId>
+  <packaging>war</packaging>
+  <name>Apache Log4j Samples: Flume - Embedded</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j.samples</groupId>
+      <artifactId>log4j-samples-flume-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-flume-ng</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flume</groupId>
+      <artifactId>flume-ng-node</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flume.flume-ng-channels</groupId>
+      <artifactId>flume-file-channel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.ws</groupId>
+      <artifactId>spring-ws-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <resources>
+      <resource>
+        <directory>../../src/main/resources</directory>
+      </resource>
+      <resource>
+        <directory>../../src/main/webapp/WEB-INF</directory>
+        <includes>
+          <include>web.xml</include>
+        </includes>
+        <filtering>true</filtering>
+        <targetPath>${project.build.directory}</targetPath>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <version>2.5.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.10</version>
+        <configuration>
+          <contextPath>flumeAgent</contextPath>
+          <webXml>${project.build.directory}/web.xml</webXml>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <stopKey>foo</stopKey>
+          <stopPort>9999</stopPort>
+          <systemProperties>
+            <systemProperty>
+              <name>log.dir</name>
+              <value>${project.build.directory}/logs</value>
+            </systemProperty>
+          </systemProperties>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/resources/flume/conf/flume-conf.properties
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/resources/flume/conf/flume-conf.properties b/log4j-samples/log4j-samples-flume-embedded/src/main/resources/flume/conf/flume-conf.properties
new file mode 100644
index 0000000..9cbbfde
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/resources/flume/conf/flume-conf.properties
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# The configuration file needs to define the sources,
+# the channels and the sinks.
+# Sources, channels and sinks are defined per agent,
+# in this case called 'agent'
+
+agent.sources = avroSrc
+agent.channels = memoryChannel
+agent.sinks =  loggerSink
+
+# For each one of the sources, the type is defined
+# agent.sources.seqGenSrc.type = seq
+
+agent.sources.avroSrc.type = avro
+agent.sources.avroSrc.bind = localhost
+agent.sources.avroSrc.port = 8800
+
+# The channel can be defined as follows.
+agent.sources.avroSrc.channels = memoryChannel
+
+# Each sink's type must be defined
+agent.sinks.loggerSink.type = logger
+
+#Specify the channel the sink should use
+agent.sinks.loggerSink.channel = memoryChannel
+
+# Each channel's type is defined.
+agent.channels.memoryChannel.type = memory
+
+# Other config values specific to each type of channel(sink or source)
+# can be defined as well
+# In this case, it specifies the capacity of the memory channel
+agent.channels.memoryChannel.capacity = 100

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/resources/log4j-embedded.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/resources/log4j-embedded.xml b/log4j-samples/log4j-samples-flume-embedded/src/main/resources/log4j-embedded.xml
new file mode 100755
index 0000000..056e1f4
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/resources/log4j-embedded.xml
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<Configuration status="debug" name="Flume" verbose="false" monitorInterval="30">
+	<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
+	<Appenders>
+
+		<Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false" embedded="true" dataDir="/tmp">
+			<Agent host="localhost" port="8800" />
+			<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
+		</Flume>
+		<Console name="console">
+			<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36}:%L %M - %msg%n" />
+		</Console>
+		<RollingFile name="RollingFile" fileName="${sys:log.dir}/app.log"
+			filePattern="${sys:log.dir}/app-%d{MM-dd-yyyy}-%i.log.gz">
+			<PatternLayout>
+				<pattern>%d %p %C{1.} [%t] %m%n</pattern>
+			</PatternLayout>
+			<Policies>
+				<TimeBasedTriggeringPolicy />
+				<SizeBasedTriggeringPolicy size="250 MB" />
+			</Policies>
+		</RollingFile>
+	</Appenders>
+	<Loggers>
+		<Logger name="EventLogger" level="WARN" additivity="false">
+			<AppenderRef ref="flume" />
+		</Logger>
+		<Root level="debug">
+			<AppenderRef ref="RollingFile" />
+		</Root>
+	</Loggers>
+</Configuration>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
new file mode 100755
index 0000000..f4b160d
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/applicationContext.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
+	xmlns:context="http://www.springframework.org/schema/context" xmlns:oxm="http://www.springframework.org/schema/oxm"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+		   http://www.springframework.org/schema/oxm
+		   http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+	<context:component-scan base-package="org.apache.logging.log4j.samples">
+		<context:exclude-filter type="annotation"
+			expression="org.springframework.ws.server.endpoint.annotation.Endpoint" />
+		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
+	</context:component-scan>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
new file mode 100755
index 0000000..73f4fb6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/rest-servlet.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:sws="http://www.springframework.org/schema/web-services"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+           http://www.springframework.org/schema/oxm
+           http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+	<context:component-scan base-package="org.apache.logging.log4j.samples.*" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/web.xml b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000..7a64562
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+	<display-name>Global Logging Services</display-name>
+	<listener>
+		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>rest</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<load-on-startup>6</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>rest</servlet-name>
+		<url-pattern>*.do</url-pattern>
+	</servlet-mapping>
+
+	<welcome-file-list>
+		<welcome-file>index.jsp</welcome-file>
+	</welcome-file-list>
+
+	<session-config>
+		<session-timeout>5</session-timeout>
+	</session-config>
+
+	<listener>
+		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
+	</listener>
+
+	<context-param>
+		<param-name>log4jConfiguration</param-name>
+		<param-value>file://${project.build.directory}/classes/log4j-embedded.xml</param-value>
+	</context-param>
+
+	<context-param>
+		<param-name>log4jContextName</param-name>
+		<param-value>GLS</param-value>
+	</context-param>
+</web-app>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/start.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/start.jsp b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/start.jsp
new file mode 100644
index 0000000..8db53a2
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/start.jsp
@@ -0,0 +1,30 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<html>
+<body>
+
+<h2>Rest Client</h2>
+<p>
+    Started
+</p>
+<form action="stop.do" method="GET">
+    <input type="submit" value="Stop" />
+</form>
+</body>
+</html>
+
+

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/stop.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/stop.jsp b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/stop.jsp
new file mode 100644
index 0000000..fab3be6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-embedded/src/main/webapp/stop.jsp
@@ -0,0 +1,28 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<html>
+<body>
+
+<h2>Rest Client</h2>
+<p>
+    Stopped
+</p>
+<form action="start.do" method="GET">
+    <input type="submit" value="Start" />
+</form>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/.gitignore b/log4j-samples/log4j-samples-flume-remote/.gitignore
new file mode 100644
index 0000000..9f0fc21
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/.gitignore
@@ -0,0 +1,4 @@
+/.settings/
+/target/
+/.classpath
+/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/README.txt
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/README.txt b/log4j-samples/log4j-samples-flume-remote/README.txt
new file mode 100644
index 0000000..3ab80d2
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/README.txt
@@ -0,0 +1,26 @@
+Sample to connect to a Flume Agent via Avro using the FlumeAppender.
+
+This sample uses the classes in the sample flume-common project. It will randomly pick from the events defined there
+and send them to Flume. At the same time it will intermix some random non-audit events.
+
+To run this sample:
+1. Run "mvn install" on the flume-common project.
+2. Download and install Flume.
+3. Copy the flume-conf.properties in src/main/resources/flume/conf to the conf directory of where Flume was installed.
+4. In a terminal window start flume using "bin/flume-ng agent --conf ./conf/ -f conf/flume-conf.properties -Dflume.root.logger=DEBUG,console -n agent"
+5. Verify Flume started and configured an Avro source, a memory channel and a logger sink by reviewing the startup log.
+6. In a separate terminal window run "mvn jetty:run" in this project.
+7. Verify the Flume appender connected to the Flume agent by finding "Starting FlumeAvroManager FlumeAvro[localhost:8800]"
+   in the jetty log and that there are no exceptions and also by seeing something like
+    "/127.0.0.1:53351 => /127.0.0.1:8800] OPEN" in the Flume log.
+8. In a separate terminal window in the project directory run "tail -f target/logs/app.log" to see the application
+   generate non-audit logs.
+9. In the browser go to url "http://localhost:8080/flumeAgent/start.do". A started message should appear on the screen.
+10. After verifying logs are being written click on the Stop button in the browser page.
+
+Note that the Flume agent must be started for the FlumeAppender to successfully start. If the Flume agent is stopped
+an exception will be thrown for each event that occurs while the agent is down. When the agent restarts the
+appender will automatically reconnect.
+
+The output from the Flume agent will include the generated Flume events. Since the events are sent individually
+Avro will print the full event and Flume will print a hex dump of the first few bytes of the event.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/pom.xml b/log4j-samples/log4j-samples-flume-remote/pom.xml
new file mode 100644
index 0000000..956e095
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/pom.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>log4j-samples</artifactId>
+    <groupId>org.apache.logging.log4j.samples</groupId>
+    <version>2.10.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>log4j-samples-flume-remote</artifactId>
+  <packaging>war</packaging>
+  <name>Apache Log4j Samples: Flume - Remote</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j.samples</groupId>
+      <artifactId>log4j-samples-flume-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-flume-ng</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.ws</groupId>
+      <artifactId>spring-ws-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <resources>
+      <resource>
+        <directory>../../src/main/resources</directory>
+      </resource>
+      <resource>
+        <directory>../../src/main/webapp/WEB-INF</directory>
+        <includes>
+          <include>web.xml</include>
+        </includes>
+        <filtering>true</filtering>
+        <targetPath>${project.build.directory}</targetPath>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <version>2.5.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.26</version>
+        <configuration>
+          <contextPath>flumeAgent</contextPath>
+          <webXml>${project.build.directory}/web.xml</webXml>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <stopKey>foo</stopKey>
+          <stopPort>9999</stopPort>
+          <systemProperties>
+            <systemProperty>
+              <name>log.dir</name>
+              <value>${project.build.directory}/logs</value>
+            </systemProperty>
+          </systemProperties>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/resources/flume/conf/flume-conf.properties
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/resources/flume/conf/flume-conf.properties b/log4j-samples/log4j-samples-flume-remote/src/main/resources/flume/conf/flume-conf.properties
new file mode 100644
index 0000000..9cbbfde
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/resources/flume/conf/flume-conf.properties
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# The configuration file needs to define the sources,
+# the channels and the sinks.
+# Sources, channels and sinks are defined per agent,
+# in this case called 'agent'
+
+agent.sources = avroSrc
+agent.channels = memoryChannel
+agent.sinks =  loggerSink
+
+# For each one of the sources, the type is defined
+# agent.sources.seqGenSrc.type = seq
+
+agent.sources.avroSrc.type = avro
+agent.sources.avroSrc.bind = localhost
+agent.sources.avroSrc.port = 8800
+
+# The channel can be defined as follows.
+agent.sources.avroSrc.channels = memoryChannel
+
+# Each sink's type must be defined
+agent.sinks.loggerSink.type = logger
+
+#Specify the channel the sink should use
+agent.sinks.loggerSink.channel = memoryChannel
+
+# Each channel's type is defined.
+agent.channels.memoryChannel.type = memory
+
+# Other config values specific to each type of channel(sink or source)
+# can be defined as well
+# In this case, it specifies the capacity of the memory channel
+agent.channels.memoryChannel.capacity = 100

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/resources/log4j-remote.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/resources/log4j-remote.xml b/log4j-samples/log4j-samples-flume-remote/src/main/resources/log4j-remote.xml
new file mode 100755
index 0000000..324b17d
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/resources/log4j-remote.xml
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<Configuration status="debug" name="Flume" verbose="false" monitorInterval="30">
+	<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
+	<Appenders>
+
+		<Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false">
+			<Agent host="localhost" port="8800" />
+			<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
+		</Flume>
+		<Console name="console">
+			<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36}:%L %M - %msg%n" />
+		</Console>
+		<RollingFile name="RollingFile" fileName="${sys:log.dir}/app.log"
+			filePattern="${sys:log.dir}/app-%d{MM-dd-yyyy}-%i.log.gz">
+			<PatternLayout>
+				<pattern>%d %p %C{1.} [%t] %m%n</pattern>
+			</PatternLayout>
+			<Policies>
+				<TimeBasedTriggeringPolicy />
+				<SizeBasedTriggeringPolicy size="250 MB" />
+			</Policies>
+		</RollingFile>
+	</Appenders>
+	<Loggers>
+		<Logger name="EventLogger" level="WARN" additivity="false">
+			<AppenderRef ref="flume" />
+		</Logger>
+		<Root level="debug">
+			<AppenderRef ref="RollingFile" />
+		</Root>
+	</Loggers>
+</Configuration>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/applicationContext.xml b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
new file mode 100755
index 0000000..f4b160d
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/applicationContext.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
+	xmlns:context="http://www.springframework.org/schema/context" xmlns:oxm="http://www.springframework.org/schema/oxm"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+		   http://www.springframework.org/schema/oxm
+		   http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+	<context:component-scan base-package="org.apache.logging.log4j.samples">
+		<context:exclude-filter type="annotation"
+			expression="org.springframework.ws.server.endpoint.annotation.Endpoint" />
+		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
+	</context:component-scan>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
new file mode 100755
index 0000000..73f4fb6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/rest-servlet.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:sws="http://www.springframework.org/schema/web-services"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+           http://www.springframework.org/schema/oxm
+           http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+	<context:component-scan base-package="org.apache.logging.log4j.samples.*" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/web.xml b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000..0a0961d
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+	<display-name>Global Logging Services</display-name>
+	<listener>
+		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>rest</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<load-on-startup>6</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>rest</servlet-name>
+		<url-pattern>*.do</url-pattern>
+	</servlet-mapping>
+
+	<welcome-file-list>
+		<welcome-file>index.jsp</welcome-file>
+	</welcome-file-list>
+
+	<session-config>
+		<session-timeout>5</session-timeout>
+	</session-config>
+
+	<listener>
+		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
+	</listener>
+
+	<context-param>
+		<param-name>log4jConfiguration</param-name>
+		<param-value>file://${project.build.directory}/classes/log4j-remote.xml</param-value>
+	</context-param>
+
+	<context-param>
+		<param-name>log4jContextName</param-name>
+		<param-value>GLS</param-value>
+	</context-param>
+</web-app>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/webapp/start.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/webapp/start.jsp b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/start.jsp
new file mode 100644
index 0000000..8db53a2
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/start.jsp
@@ -0,0 +1,30 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<html>
+<body>
+
+<h2>Rest Client</h2>
+<p>
+    Started
+</p>
+<form action="stop.do" method="GET">
+    <input type="submit" value="Stop" />
+</form>
+</body>
+</html>
+
+

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-flume-remote/src/main/webapp/stop.jsp
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-flume-remote/src/main/webapp/stop.jsp b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/stop.jsp
new file mode 100644
index 0000000..fab3be6
--- /dev/null
+++ b/log4j-samples/log4j-samples-flume-remote/src/main/webapp/stop.jsp
@@ -0,0 +1,28 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<html>
+<body>
+
+<h2>Rest Client</h2>
+<p>
+    Stopped
+</p>
+<form action="start.do" method="GET">
+    <input type="submit" value="Start" />
+</form>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/.gitignore b/log4j-samples/log4j-samples-loggerProperties/.gitignore
new file mode 100644
index 0000000..ddd6d6d
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/.gitignore
@@ -0,0 +1,3 @@
+/.settings/
+/.classpath
+/.project

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/pom.xml b/log4j-samples/log4j-samples-loggerProperties/pom.xml
new file mode 100644
index 0000000..e1e495c
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>log4j-samples</artifactId>
+    <groupId>org.apache.logging.log4j.samples</groupId>
+    <version>2.10.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>log4j-samples-loggerProperties</artifactId>
+  <packaging>jar</packaging>
+  <name>Apache Log4j Samples: LoggerProperties</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
new file mode 100644
index 0000000..8bd3415
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.lookup;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.Marker;
+import org.apache.logging.log4j.MarkerManager;
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.config.plugins.Plugin;
+import org.apache.logging.log4j.core.lookup.AbstractLookup;
+import org.apache.logging.log4j.core.lookup.StrLookup;
+import org.apache.logging.log4j.status.StatusLogger;
+
+import java.lang.Override;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ *
+ */
+
+@Plugin(name = "custom", category = StrLookup.CATEGORY)
+public class CustomLookup extends AbstractLookup {
+
+    private static final Logger LOGGER = StatusLogger.getLogger();
+    private static final Marker LOOKUP = MarkerManager.getMarker("LOOKUP");
+
+    private static ConcurrentMap<String, Map<String, String>> loggerProperties = new ConcurrentHashMap<>();
+
+    /**
+     * Looks up the value for the key using the data in the LogEvent.
+     * @param event The current LogEvent.
+     * @param key  the key to be looked up, may be null
+     * @return The value associated with the key.
+     */
+    @Override
+    public String lookup(final LogEvent event, final String key) {
+        try {
+            final Map<String, String> properties = loggerProperties.get(event.getLoggerName());
+            if (properties == null) {
+                return "";
+            }
+            if (key == null || key.length() == 0 || key.equals("*")) {
+                final StringBuilder sb = new StringBuilder("{");
+                boolean first = true;
+                for (final Map.Entry<String, String> entry : properties.entrySet()) {
+                    if (!first) {
+                        sb.append(", ");
+                    }
+                    sb.append(entry.getKey()).append("=").append(entry.getValue());
+                    first = false;
+                }
+                sb.append("}");
+                return sb.toString();
+            }
+            return properties.get(key);
+        } catch (final Exception ex) {
+            LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
+            return null;
+        }
+    }
+
+    public static void setLoggerProperties(final String loggerName, final Map<String, String> properties) {
+        loggerProperties.put(loggerName, properties);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
new file mode 100644
index 0000000..06f78f4
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomMapMessage.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.lookup;
+
+import org.apache.logging.log4j.message.AsynchronouslyFormattable;
+import org.apache.logging.log4j.message.StringMapMessage;
+
+import java.util.Map;
+
+/**
+ *
+ */
+@AsynchronouslyFormattable
+public class CustomMapMessage extends StringMapMessage {
+
+    private static final long serialVersionUID = 1L;
+    private final String message;
+
+    public CustomMapMessage(final String msg, final Map<String, String> map) {
+        super(map);
+        this.message = msg;
+    }
+
+    @Override
+    public String getFormattedMessage(final String[] formats) {
+        if (message != null) {
+            return message;
+        }
+        return super.getFormattedMessage(formats);
+    }
+
+    @Override
+    public String getFormattedMessage() {
+        if (message != null) {
+            return message;
+        }
+        return super.getFormattedMessage();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb97e2b6/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
new file mode 100644
index 0000000..1184382
--- /dev/null
+++ b/log4j-samples/log4j-samples-loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.lookup;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.Marker;
+import org.apache.logging.log4j.MarkerManager;
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.config.plugins.Plugin;
+import org.apache.logging.log4j.core.lookup.AbstractLookup;
+import org.apache.logging.log4j.core.lookup.StrLookup;
+import org.apache.logging.log4j.message.StringMapMessage;
+import org.apache.logging.log4j.message.Message;
+import org.apache.logging.log4j.status.StatusLogger;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ *
+ */
+
+@Plugin(name = "mapMessage", category = StrLookup.CATEGORY)
+public class MapMessageLookup extends AbstractLookup {
+
+    private static final Logger LOGGER = StatusLogger.getLogger();
+    private static final Marker LOOKUP = MarkerManager.getMarker("LOOKUP");
+
+    private static ConcurrentMap<String, Map<String, String>> loggerProperties = new ConcurrentHashMap<>();
+
+    /**
+     * Looks up the value for the key using the data in the LogEvent.
+     * @param event The current LogEvent.
+     * @param key  the key to be looked up, may be null
+     * @return The value associated with the key.
+     */
+    @Override
+    public String lookup(final LogEvent event, final String key) {
+        final Message msg = event.getMessage();
+        if (msg instanceof StringMapMessage) {
+            try {
+                final Map<String, String> properties = ((StringMapMessage) msg).getData();
+                if (properties == null) {
+                    return "";
+                }
+                if (key == null || key.length() == 0 || key.equals("*")) {
+                    final StringBuilder sb = new StringBuilder("{");
+                    boolean first = true;
+                    for (final Map.Entry<String, String> entry : properties.entrySet()) {
+                        if (!first) {
+                            sb.append(", ");
+                        }
+                        sb.append(entry.getKey()).append("=").append(entry.getValue());
+                        first = false;
+                    }
+                    sb.append("}");
+                    return sb.toString();
+                }
+                return properties.get(key);
+            } catch (final Exception ex) {
+                LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
+                return null;
+            }
+        }
+        return null;
+    }
+
+    public static void setLoggerProperties(final String loggerName, final Map<String, String> properties) {
+        loggerProperties.put(loggerName, properties);
+    }
+
+}
+