logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1514570 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/ api/src/main/java/org/apache/logging/log4j/spi/ api/src/main/java/org/apache/logging/log4j/status/ api/src/main/java/org/apache/logging/log4j/util/ core/...
Date Fri, 16 Aug 2013 03:55:05 GMT
Author: rpopma
Date: Fri Aug 16 03:55:05 2013
New Revision: 1514570

URL: http://svn.apache.org/r1514570
Log:
replaced tab indents with spaces, format

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/EventLogger.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Agent.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/EventLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/EventLogger.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/EventLogger.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/EventLogger.java Fri Aug 16 03:55:05 2013
@@ -27,7 +27,7 @@ public final class EventLogger {
 
     private static final String NAME = "EventLogger";
 
-	/**
+    /**
      * Define the Event Marker.
      */
     public static final Marker EVENT_MARKER = MarkerManager.getMarker("EVENT");

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java Fri Aug 16 03:55:05 2013
@@ -416,9 +416,9 @@ public class LogManager {
      *
      * @return the root logger, named {@link #ROOT_LOGGER_NAME}.
      */
-	public static Logger getRootLogger() {
-		return getLogger(ROOT_LOGGER_NAME);
-	}
+    public static Logger getRootLogger() {
+        return getLogger(ROOT_LOGGER_NAME);
+    }
 
     /**
      * Prevents instantiation

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java Fri Aug 16 03:55:05 2013
@@ -1456,7 +1456,7 @@ public abstract class AbstractLogger imp
      * @param params Arguments specified by the format.
      */
     @Override
-	public void printf(Level level, String format, Object... params) {
+    public void printf(Level level, String format, Object... params) {
         if (isEnabled(level, null, format, params)) {
             Message msg = new StringFormattedMessage(format, params);
             log(null, FQCN, level, msg, msg.getThrowable());
@@ -1471,7 +1471,7 @@ public abstract class AbstractLogger imp
      * @param params Arguments specified by the format.
      */
     @Override
-	public void printf(Level level, Marker marker, String format, Object... params) {
+    public void printf(Level level, Marker marker, String format, Object... params) {
         if (isEnabled(level, marker, format, params)) {
             Message msg = new StringFormattedMessage(format, params);
             log(marker, FQCN, level, msg, msg.getThrowable());

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java Fri Aug 16 03:55:05 2013
@@ -24,7 +24,7 @@ import java.util.Properties;
  */
 public class Provider {
     private static final Integer DEFAULT_PRIORITY = Integer.valueOf(-1);
-	private static final String FACTORY_PRIORITY = "FactoryPriority";
+    private static final String FACTORY_PRIORITY = "FactoryPriority";
     private static final String THREAD_CONTEXT_MAP = "ThreadContextMap";
     private static final String LOGGER_CONTEXT_FACTORY = "LoggerContextFactory";
 

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java Fri Aug 16 03:55:05 2013
@@ -79,7 +79,7 @@ public class StatusConsoleListener imple
      * @return the Log Level.
      */
     @Override
-	public Level getStatusLevel() {
+    public Level getStatusLevel() {
         return this.level;
     }
 

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java Fri Aug 16 03:55:05 2013
@@ -38,40 +38,40 @@ public class PropertiesUtil {
         this.props = props;
     }
 
-	/**
-	 * Loads and closes the given property input stream.
-	 * If an error occurs, log to the status logger.
-	 * 
-	 * @param in
-	 *            a property input stream.
-	 * @param source
-	 *            a source object describing the source, like a resource string
-	 *            or a URL.
-	 * @return a new Properties object
-	 */
-	static Properties loadClose(InputStream in, Object source) {
-		Properties props = new Properties();
-		if (null != in) {
-			try {
-				props.load(in);
-			} catch (final IOException e) {
-				LOGGER.error("Unable to read " + source, e);
-			} finally {
-				try {
-					in.close();
-				} catch (final IOException e) {
-					LOGGER.error("Unable to close " + source, e);
-				}
-			}
-		}
-		return props;
-	}
+    /**
+     * Loads and closes the given property input stream.
+     * If an error occurs, log to the status logger.
+     * 
+     * @param in
+     *            a property input stream.
+     * @param source
+     *            a source object describing the source, like a resource string
+     *            or a URL.
+     * @return a new Properties object
+     */
+    static Properties loadClose(InputStream in, Object source) {
+        Properties props = new Properties();
+        if (null != in) {
+            try {
+                props.load(in);
+            } catch (final IOException e) {
+                LOGGER.error("Unable to read " + source, e);
+            } finally {
+                try {
+                    in.close();
+                } catch (final IOException e) {
+                    LOGGER.error("Unable to close " + source, e);
+                }
+            }
+        }
+        return props;
+    }
     
-	public PropertiesUtil(final String propsLocn) {
-		final ClassLoader loader = ProviderUtil.findClassLoader();
-		final InputStream in = loader.getResourceAsStream(propsLocn);
-		this.props = loadClose(in, propsLocn);
-	}
+    public PropertiesUtil(final String propsLocn) {
+        final ClassLoader loader = ProviderUtil.findClassLoader();
+        final InputStream in = loader.getResourceAsStream(propsLocn);
+        this.props = loadClose(in, propsLocn);
+    }
 
     public static PropertiesUtil getProperties() {
         return LOG4J_PROPERTIES;

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicyTest.java Fri Aug 16 03:55:05 2013
@@ -36,116 +36,120 @@ import org.junit.Test;
 
 
 public class MapRewritePolicyTest {
-	private static Map<String, String> map = new HashMap<String, String>();
-	private static KeyValuePair[] rewrite;
-	private static LogEvent logEvent0, logEvent1, logEvent2, logEvent3;
-
-	@BeforeClass
-	public static void setupClass() {
-		map.put("test1", "one");
-		map.put("test2", "two");
-		logEvent0 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ERROR,
+    private static Map<String, String> map = new HashMap<String, String>();
+    private static KeyValuePair[] rewrite;
+    private static LogEvent logEvent0, logEvent1, logEvent2, logEvent3;
+
+    @BeforeClass
+    public static void setupClass() {
+        map.put("test1", "one");
+        map.put("test2", "two");
+        logEvent0 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ERROR,
         new SimpleMessage("Test"), new RuntimeException("test"), map, null, "none",
         new StackTraceElement("MapRewritePolicyTest", "setupClass", "MapRewritePolicyTest", 28), 2);
-		logEvent1 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ERROR,
+        logEvent1 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ERROR,
         new MapMessage(map), null, map, null, "none",
         new StackTraceElement("MapRewritePolicyTest", "setupClass", "MapRewritePolicyTest", 29), 2);
     final ThreadContextStack stack = new MutableThreadContextStack(new ArrayList<String>(map.values()));
-		logEvent2 = new Log4jLogEvent("test", MarkerManager.getMarker("test"), "MapRewritePolicyTest.setupClass()",
+        logEvent2 = new Log4jLogEvent("test", MarkerManager.getMarker("test"), "MapRewritePolicyTest.setupClass()",
         Level.TRACE, new StructuredDataMessage("test", "Nothing", "test", map), new RuntimeException("test"), null,
         stack, "none", new StackTraceElement("MapRewritePolicyTest",
         "setupClass", "MapRewritePolicyTest", 30), 20000000);
-		logEvent3 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ALL, new MapMessage(map),
+        logEvent3 = new Log4jLogEvent("test", null, "MapRewritePolicyTest.setupClass()", Level.ALL, new MapMessage(map),
         null, map, stack, null, new StackTraceElement("MapRewritePolicyTest",
         "setupClass", "MapRewritePolicyTest", 31), Long.MAX_VALUE);
-		rewrite = new KeyValuePair[] {new KeyValuePair("test2", "2"), new KeyValuePair("test3", "three")};
-	}
+        rewrite = new KeyValuePair[] {new KeyValuePair("test2", "2"), new KeyValuePair("test3", "three")};
+    }
 
-	@Test
-	public void addTest() {
-		final MapRewritePolicy addPolicy = MapRewritePolicy.createPolicy("Add", rewrite);
-		LogEvent rewritten = addPolicy.rewrite(logEvent0);
-		compareLogEvents(logEvent0, rewritten);
-		Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
-
-		rewritten = addPolicy.rewrite(logEvent1);
-		compareLogEvents(logEvent1, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = addPolicy.rewrite(logEvent2);
-		compareLogEvents(logEvent2, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = addPolicy.rewrite(logEvent3);
-		compareLogEvents(logEvent3, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-	}
-
-	@Test
-	public void updateTest() {
-		final MapRewritePolicy updatePolicy = MapRewritePolicy.createPolicy("Update", rewrite);
-		LogEvent rewritten = updatePolicy.rewrite(logEvent0);
-		compareLogEvents(logEvent0, rewritten);
-		Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
-
-		rewritten = updatePolicy.rewrite(logEvent1);
-		compareLogEvents(logEvent1, rewritten);
-		checkUpdated(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = updatePolicy.rewrite(logEvent2);
-		compareLogEvents(logEvent2, rewritten);
-		checkUpdated(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = updatePolicy.rewrite(logEvent3);
-		compareLogEvents(logEvent3, rewritten);
-		checkUpdated(((MapMessage)rewritten.getMessage()).getData());
-	}
-
-	@Test
-	public void defaultIsAdd() {
-		final MapRewritePolicy addPolicy = MapRewritePolicy.createPolicy(null, rewrite);
-		LogEvent rewritten = addPolicy.rewrite(logEvent0);
-		compareLogEvents(logEvent0, rewritten);
-		Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
-
-		rewritten = addPolicy.rewrite(logEvent1);
-		compareLogEvents(logEvent1, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = addPolicy.rewrite(logEvent2);
-		compareLogEvents(logEvent2, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-
-		rewritten = addPolicy.rewrite(logEvent3);
-		compareLogEvents(logEvent3, rewritten);
-		checkAdded(((MapMessage)rewritten.getMessage()).getData());
-	}
-
-	private void checkAdded(final Map<String, String> addedMap) {
-		Assert.assertEquals("unwanted entry change", "one", addedMap.get("test1"));
-		Assert.assertEquals("existing entry not updated", "2", addedMap.get("test2"));
-		Assert.assertEquals("new entry not added", "three", addedMap.get("test3"));
-		Assert.assertEquals("wrong size", 3, addedMap.size());
-	}
-
-	private void checkUpdated(final Map<String, String> updatedMap) {
-		Assert.assertEquals("unwanted entry change", "one", updatedMap.get("test1"));
-		Assert.assertEquals("existing entry not updated", "2", updatedMap.get("test2"));
-		Assert.assertEquals("wrong size", 2, updatedMap.size());
-	}
-
-	private void compareLogEvents(final LogEvent orig, final LogEvent changed) {
-		// Ensure that everything but the Mapped Data is still the same
-		Assert.assertEquals("LoggerName changed", orig.getLoggerName(), changed.getLoggerName());
-		Assert.assertEquals("Marker changed", orig.getMarker(), changed.getMarker());
-		Assert.assertEquals("FQCN changed", orig.getFQCN(), changed.getFQCN());
-		Assert.assertEquals("Level changed", orig.getLevel(), changed.getLevel());
-		Assert.assertEquals("Throwable changed", orig.getThrown() == null ? null : ((Log4jLogEvent) orig).getThrownProxy().getExtendedStackTrace(),
-				changed.getThrown() == null ? null : ((Log4jLogEvent) changed).getThrownProxy().getExtendedStackTrace());
-		Assert.assertEquals("ContextMap changed", orig.getContextMap(), changed.getContextMap());
-		Assert.assertEquals("ContextStack changed", orig.getContextStack(), changed.getContextStack());
-		Assert.assertEquals("ThreadName changed", orig.getThreadName(), changed.getThreadName());
-		Assert.assertEquals("Source changed", orig.getSource(), changed.getSource());
-		Assert.assertEquals("Millis changed", orig.getMillis(), changed.getMillis());
-	}
+    @Test
+    public void addTest() {
+        final MapRewritePolicy addPolicy = MapRewritePolicy.createPolicy("Add", rewrite);
+        LogEvent rewritten = addPolicy.rewrite(logEvent0);
+        compareLogEvents(logEvent0, rewritten);
+        Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
+
+        rewritten = addPolicy.rewrite(logEvent1);
+        compareLogEvents(logEvent1, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = addPolicy.rewrite(logEvent2);
+        compareLogEvents(logEvent2, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = addPolicy.rewrite(logEvent3);
+        compareLogEvents(logEvent3, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+    }
+
+    @Test
+    public void updateTest() {
+        final MapRewritePolicy updatePolicy = MapRewritePolicy.createPolicy("Update", rewrite);
+        LogEvent rewritten = updatePolicy.rewrite(logEvent0);
+        compareLogEvents(logEvent0, rewritten);
+        Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
+
+        rewritten = updatePolicy.rewrite(logEvent1);
+        compareLogEvents(logEvent1, rewritten);
+        checkUpdated(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = updatePolicy.rewrite(logEvent2);
+        compareLogEvents(logEvent2, rewritten);
+        checkUpdated(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = updatePolicy.rewrite(logEvent3);
+        compareLogEvents(logEvent3, rewritten);
+        checkUpdated(((MapMessage)rewritten.getMessage()).getData());
+    }
+
+    @Test
+    public void defaultIsAdd() {
+        final MapRewritePolicy addPolicy = MapRewritePolicy.createPolicy(null, rewrite);
+        LogEvent rewritten = addPolicy.rewrite(logEvent0);
+        compareLogEvents(logEvent0, rewritten);
+        Assert.assertEquals("Simple log message changed", logEvent0.getMessage(), rewritten.getMessage());
+
+        rewritten = addPolicy.rewrite(logEvent1);
+        compareLogEvents(logEvent1, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = addPolicy.rewrite(logEvent2);
+        compareLogEvents(logEvent2, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+
+        rewritten = addPolicy.rewrite(logEvent3);
+        compareLogEvents(logEvent3, rewritten);
+        checkAdded(((MapMessage)rewritten.getMessage()).getData());
+    }
+
+    private void checkAdded(final Map<String, String> addedMap) {
+        Assert.assertEquals("unwanted entry change", "one", addedMap.get("test1"));
+        Assert.assertEquals("existing entry not updated", "2", addedMap.get("test2"));
+        Assert.assertEquals("new entry not added", "three", addedMap.get("test3"));
+        Assert.assertEquals("wrong size", 3, addedMap.size());
+    }
+
+    private void checkUpdated(final Map<String, String> updatedMap) {
+        Assert.assertEquals("unwanted entry change", "one", updatedMap.get("test1"));
+        Assert.assertEquals("existing entry not updated", "2", updatedMap.get("test2"));
+        Assert.assertEquals("wrong size", 2, updatedMap.size());
+    }
+
+    private void compareLogEvents(final LogEvent orig, final LogEvent changed) {
+        // Ensure that everything but the Mapped Data is still the same
+        Assert.assertEquals("LoggerName changed", orig.getLoggerName(), changed.getLoggerName());
+        Assert.assertEquals("Marker changed", orig.getMarker(), changed.getMarker());
+        Assert.assertEquals("FQCN changed", orig.getFQCN(), changed.getFQCN());
+        Assert.assertEquals("Level changed", orig.getLevel(), changed.getLevel());
+        Assert.assertEquals("Throwable changed", orig.getThrown() == null //
+                ? null //
+                : ((Log4jLogEvent) orig).getThrownProxy().getExtendedStackTrace(), //
+                changed.getThrown() == null //
+                        ? null //
+                        : ((Log4jLogEvent) changed).getThrownProxy().getExtendedStackTrace());
+        Assert.assertEquals("ContextMap changed", orig.getContextMap(), changed.getContextMap());
+        Assert.assertEquals("ContextStack changed", orig.getContextStack(), changed.getContextStack());
+        Assert.assertEquals("ThreadName changed", orig.getThreadName(), changed.getThreadName());
+        Assert.assertEquals("Source changed", orig.getSource(), changed.getSource());
+        Assert.assertEquals("Millis changed", orig.getMillis(), changed.getMillis());
+    }
 }

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Agent.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Agent.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Agent.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/Agent.java Fri Aug 16 03:55:05 2013
@@ -73,18 +73,18 @@ public final class Agent {
      */
     @PluginFactory
     public static Agent createAgent(@PluginAttr("host") String host,
-			@PluginAttr("port") final String port) {
-		if (host == null) {
-			host = DEFAULT_HOST;
-		}
+            @PluginAttr("port") final String port) {
+        if (host == null) {
+            host = DEFAULT_HOST;
+        }
 
-		int portNum;
-		try {
-			portNum = Integers.parseInt(port, DEFAULT_PORT);
-		} catch (final Exception ex) {
-			LOGGER.error("Error parsing port number " + port, ex);
-			return null;
-		}
-		return new Agent(host, portNum);
-	}
+        int portNum;
+        try {
+            portNum = Integers.parseInt(port, DEFAULT_PORT);
+        } catch (final Exception ex) {
+            LOGGER.error("Error parsing port number " + port, ex);
+            return null;
+        }
+        return new Agent(host, portNum);
+    }
 }

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java Fri Aug 16 03:55:05 2013
@@ -659,7 +659,7 @@ public class FlumePersistentManager exte
         }
 
         @Override
-		public Thread newThread(final Runnable r) {
+	    public Thread newThread(final Runnable r) {
             final Thread thread = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);
             thread.setDaemon(true);
             if (thread.getPriority() != Thread.NORM_PRIORITY) {

Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java Fri Aug 16 03:55:05 2013
@@ -90,9 +90,9 @@ public class FlumeAppenderTest {
 
         avroLogger = (Logger) LogManager.getLogger("avrologger");
         /*
-        * Clear out all other appenders associated with this logger to ensure we're
-        * only hitting the Avro appender.
-        */
+         * Clear out all other appenders associated with this logger to ensure
+         * we're only hitting the Avro appender.
+         */
         removeAppenders(avroLogger);
         final Context context = new Context();
         testPort = String.valueOf(testServerPort);
@@ -110,26 +110,31 @@ public class FlumeAppenderTest {
 
         eventSource.start();
 
-    	  Assert.assertTrue("Reached start or error", LifecycleController.waitForOneOf(
-            eventSource, LifecycleState.START_OR_ERROR));
-        Assert.assertEquals("Server is started", LifecycleState.START, eventSource.getLifecycleState());
+        Assert.assertTrue("Reached start or error", LifecycleController
+                .waitForOneOf(eventSource, LifecycleState.START_OR_ERROR));
+        Assert.assertEquals("Server is started", LifecycleState.START,
+                eventSource.getLifecycleState());
     }
 
     @After
     public void teardown() throws Exception {
         removeAppenders(avroLogger);
         eventSource.stop();
-	      Assert.assertTrue("Reached stop or error",
-	           LifecycleController.waitForOneOf(eventSource, LifecycleState.STOP_OR_ERROR));
-	      Assert.assertEquals("Server is stopped", LifecycleState.STOP,
-	           eventSource.getLifecycleState());
+        Assert.assertTrue("Reached stop or error", LifecycleController
+                .waitForOneOf(eventSource, LifecycleState.STOP_OR_ERROR));
+        Assert.assertEquals("Server is stopped", LifecycleState.STOP,
+                eventSource.getLifecycleState());
     }
 
     @Test
-    public void testLog4jAvroAppender() throws InterruptedException, IOException {
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "1", null, null, null);
+    public void testLog4jAvroAppender() throws InterruptedException,
+            IOException {
+        final Agent[] agents = new Agent[] { Agent.createAgent("localhost",
+                testPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "1",
+                null, null, null);
         avroAppender.start();
         avroLogger.addAppender(avroAppender);
         avroLogger.setLevel(Level.ALL);
@@ -142,27 +147,31 @@ public class FlumeAppenderTest {
         transaction.begin();
 
         final Event event = channel.take();
-   	    Assert.assertNotNull(event);
-  	    Assert.assertTrue("Channel contained event, but not expected message",
-            getBody(event).endsWith("Test message"));
-	      transaction.commit();
-	      transaction.close();
+        Assert.assertNotNull(event);
+        Assert.assertTrue("Channel contained event, but not expected message",
+                getBody(event).endsWith("Test message"));
+        transaction.commit();
+        transaction.close();
 
-	      eventSource.stop();
+        eventSource.stop();
     }
 
     @Test
     public void testStructured() throws InterruptedException, IOException {
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, "ReqCtx_", null, "true", "1", null, null, null);
+        final Agent[] agents = new Agent[] { Agent.createAgent("localhost",
+                testPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, "ReqCtx_", null, "true",
+                "1", null, null, null);
         avroAppender.start();
         final Logger eventLogger = (Logger) LogManager.getLogger("EventLogger");
         Assert.assertNotNull(eventLogger);
         eventLogger.addAppender(avroAppender);
         eventLogger.setLevel(Level.ALL);
 
-        final StructuredDataMessage msg = new StructuredDataMessage("Transfer", "Success", "Audit");
+        final StructuredDataMessage msg = new StructuredDataMessage("Transfer",
+                "Success", "Audit");
         msg.put("memo", "This is a memo");
         msg.put("acct", "12345");
         msg.put("amount", "100.00");
@@ -178,7 +187,7 @@ public class FlumeAppenderTest {
         final Event event = channel.take();
         Assert.assertNotNull(event);
         Assert.assertTrue("Channel contained event, but not expected message",
-            getBody(event).endsWith("Success"));
+                getBody(event).endsWith("Success"));
         transaction.commit();
         transaction.close();
 
@@ -187,13 +196,14 @@ public class FlumeAppenderTest {
         avroAppender.stop();
     }
 
-
-
     @Test
     public void testMultiple() throws InterruptedException, IOException {
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "1", null, null, null);
+        final Agent[] agents = new Agent[] { Agent.createAgent("localhost",
+                testPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "1",
+                null, null, null);
         avroAppender.start();
         avroLogger.addAppender(avroAppender);
         avroLogger.setLevel(Level.ALL);
@@ -209,21 +219,25 @@ public class FlumeAppenderTest {
             transaction.begin();
 
             final Event event = channel.take();
-   	        Assert.assertNotNull(event);
-  	        Assert.assertTrue("Channel contained event, but not expected message",
-                getBody(event).endsWith("Test message " + i));
-	          transaction.commit();
-	          transaction.close();
+            Assert.assertNotNull(event);
+            Assert.assertTrue(
+                    "Channel contained event, but not expected message",
+                    getBody(event).endsWith("Test message " + i));
+            transaction.commit();
+            transaction.close();
         }
 
-	      eventSource.stop();
+        eventSource.stop();
     }
 
-     @Test
+    @Test
     public void testBatch() throws InterruptedException, IOException {
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort)};
-         final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-             "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "10", null, null, null);
+        final Agent[] agents = new Agent[] { Agent.createAgent("localhost",
+                testPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "10",
+                null, null, null);
         avroAppender.start();
         avroLogger.addAppender(avroAppender);
         avroLogger.setLevel(Level.ALL);
@@ -239,22 +253,25 @@ public class FlumeAppenderTest {
 
         for (int i = 0; i < 10; ++i) {
             final Event event = channel.take();
-   	        Assert.assertNotNull("No event for item " + i, event);
-  	        Assert.assertTrue("Channel contained event, but not expected message",
-                getBody(event).endsWith("Test message " + i));
+            Assert.assertNotNull("No event for item " + i, event);
+            Assert.assertTrue(
+                    "Channel contained event, but not expected message",
+                    getBody(event).endsWith("Test message " + i));
         }
-	      transaction.commit();
-	      transaction.close();
+        transaction.commit();
+        transaction.close();
 
-	      eventSource.stop();
+        eventSource.stop();
     }
 
-
     @Test
     public void testConnectionRefused() {
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "1", null, null, null);
+        final Agent[] agents = new Agent[] { Agent.createAgent("localhost",
+                testPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "1",
+                null, null, null);
         avroAppender.start();
         avroLogger.addAppender(avroAppender);
         avroLogger.setLevel(Level.ALL);
@@ -265,7 +282,8 @@ public class FlumeAppenderTest {
         try {
             avroLogger.info("message 1");
         } catch (final Throwable t) {
-            //logger.debug("Logging to a non-existent server failed (as expected)", t);
+            // logger.debug("Logging to a non-existent server failed (as expected)",
+            // t);
 
             caughtException = true;
         }
@@ -277,10 +295,13 @@ public class FlumeAppenderTest {
     public void testNotConnected() throws Exception {
         eventSource.stop();
         final String altPort = Integer.toString(Integer.parseInt(testPort) + 1);
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort),
-            Agent.createAgent("localhost", altPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "1", null, null, null);
+        final Agent[] agents = new Agent[] {
+                Agent.createAgent("localhost", testPort),
+                Agent.createAgent("localhost", altPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "1",
+                null, null, null);
         avroAppender.start();
         Assert.assertTrue("Appender Not started", avroAppender.isStarted());
         avroLogger.addAppender(avroAppender);
@@ -302,7 +323,8 @@ public class FlumeAppenderTest {
 
             eventSource.start();
         } catch (final ChannelException e) {
-            Assert.fail("Caught exception while resetting port to " + altPort + " : " + e.getMessage());
+            Assert.fail("Caught exception while resetting port to " + altPort
+                    + " : " + e.getMessage());
         }
 
         avroLogger.info("Test message 2");
@@ -313,19 +335,21 @@ public class FlumeAppenderTest {
         final Event event = channel.take();
         Assert.assertNotNull(event);
         Assert.assertTrue("Channel contained event, but not expected message",
-            getBody(event).endsWith("Test message 2"));
+                getBody(event).endsWith("Test message 2"));
         transaction.commit();
         transaction.close();
     }
 
-
     @Test
     public void testReconnect() throws Exception {
         final String altPort = Integer.toString(Integer.parseInt(testPort) + 1);
-        final Agent[] agents = new Agent[] {Agent.createAgent("localhost", testPort),
-                                      Agent.createAgent("localhost", altPort)};
-        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents, null, "false", "Avro", null, "1000",
-            "1000", "1", "1000", "avro", "false", null, null, null, null, null, "true", "1", null, null, null);
+        final Agent[] agents = new Agent[] {
+                Agent.createAgent("localhost", testPort),
+                Agent.createAgent("localhost", altPort) };
+        final FlumeAppender avroAppender = FlumeAppender.createAppender(agents,
+                null, "false", "Avro", null, "1000", "1000", "1", "1000",
+                "avro", "false", null, null, null, null, null, "true", "1",
+                null, null, null);
         avroAppender.start();
         avroLogger.addAppender(avroAppender);
         avroLogger.setLevel(Level.ALL);
@@ -336,11 +360,11 @@ public class FlumeAppenderTest {
         transaction.begin();
 
         Event event = channel.take();
-   	    Assert.assertNotNull(event);
-  	    Assert.assertTrue("Channel contained event, but not expected message",
-            getBody(event).endsWith("Test message"));
-	      transaction.commit();
-	      transaction.close();
+        Assert.assertNotNull(event);
+        Assert.assertTrue("Channel contained event, but not expected message",
+                getBody(event).endsWith("Test message"));
+        transaction.commit();
+        transaction.close();
 
         eventSource.stop();
         try {
@@ -352,7 +376,8 @@ public class FlumeAppenderTest {
 
             eventSource.start();
         } catch (final ChannelException e) {
-            Assert.fail("Caught exception while resetting port to " + altPort + " : " + e.getMessage());
+            Assert.fail("Caught exception while resetting port to " + altPort
+                    + " : " + e.getMessage());
         }
 
         avroLogger.info("Test message 2");
@@ -361,17 +386,15 @@ public class FlumeAppenderTest {
         transaction.begin();
 
         event = channel.take();
-   	    Assert.assertNotNull(event);
-  	    Assert.assertTrue("Channel contained event, but not expected message",
-            getBody(event).endsWith("Test message 2"));
-	      transaction.commit();
-	      transaction.close();
+        Assert.assertNotNull(event);
+        Assert.assertTrue("Channel contained event, but not expected message",
+                getBody(event).endsWith("Test message 2"));
+        transaction.commit();
+        transaction.close();
     }
 
-
-
     private void removeAppenders(final Logger logger) {
-        final Map<String,Appender> map = logger.getAppenders();
+        final Map<String, Appender> map = logger.getAppenders();
         for (final Map.Entry<String, Appender> entry : map.entrySet()) {
             final Appender app = entry.getValue();
             avroLogger.removeAppender(app);
@@ -385,12 +408,13 @@ public class FlumeAppenderTest {
 
     private String getBody(final Event event) throws IOException {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            final InputStream is = new GZIPInputStream(new ByteArrayInputStream(event.getBody()));
-            int n = 0;
-            while (-1 != (n = is.read())) {
-                baos.write(n);
-            }
-            return new String(baos.toByteArray());
+        final InputStream is = new GZIPInputStream(new ByteArrayInputStream(
+                event.getBody()));
+        int n = 0;
+        while (-1 != (n = is.read())) {
+            baos.write(n);
+        }
+        return new String(baos.toByteArray());
 
     }
 }

Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java Fri Aug 16 03:55:05 2013
@@ -131,9 +131,9 @@ public class FlumeEmbeddedAppenderTest {
         EventLogger.logEvent(msg);
 
         final Event event = primary.poll();
-   	    Assert.assertNotNull(event);
+        Assert.assertNotNull(event);
         final String body = getBody(event);
-  	    Assert.assertTrue("Channel contained event, but not expected message. Received: " + body,
+        Assert.assertTrue("Channel contained event, but not expected message. Received: " + body,
             body.endsWith("Test Log4j"));
     }
 

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java Fri Aug 16 03:55:05 2013
@@ -52,7 +52,7 @@ public class LogEventFactory {
         }
 
         @Override
-		public Object invoke(final Object o, final Method method, final Object[] objects)
+        public Object invoke(final Object o, final Method method, final Object[] objects)
             throws Throwable {
             if (method.getName().equals("logEvent")) {
 

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java Fri Aug 16 03:55:05 2013
@@ -95,7 +95,7 @@ public class LoggingApp {
         }
 
         @Override
-		public void run() {
+        public void run() {
             System.out.println("STARTING..................");
 
             while (!shutdown) {

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/MockEventsSupplier.java Fri Aug 16 03:55:05 2013
@@ -29,70 +29,70 @@ import java.util.Random;
 
 public class MockEventsSupplier {
 
-	/* This provides random generation */
-	static Random ran = new Random();
+    /* This provides random generation */
+    static Random ran = new Random();
 
-	public static List<AuditEvent> getAllEvents(final String member) {
+    public static List<AuditEvent> getAllEvents(final String member) {
 
-		final List<AuditEvent> events = new ArrayList<AuditEvent>();
+        final List<AuditEvent> events = new ArrayList<AuditEvent>();
 
 
-		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);
+        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;
-	}
+        return events;
+    }
 }

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java?rev=1514570&r1=1514569&r2=1514570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/dto/Constraint.java Fri Aug 16 03:55:05 2013
@@ -25,13 +25,13 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Constraint {
 
-	boolean required() default false;
+    boolean required() default false;
 
-	String pattern() default "";
+    String pattern() default "";
 
-	int minLength() default -1;
+    int minLength() default -1;
 
-	int maxLength() default -1;
+    int maxLength() default -1;
 
-	int totalDigits() default -1;
+    int totalDigits() default -1;
 }



Mime
View raw message