logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1469103 [3/3] - in /logging/log4j/log4j2/trunk/core/src: main/java/org/apache/logging/log4j/core/appender/ main/java/org/apache/logging/log4j/core/appender/rolling/ main/java/org/apache/logging/log4j/core/async/ test/java/org/apache/loggin...
Date Wed, 17 Apr 2013 23:35:47 GMT
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j1.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j1.java?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j1.java
(added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j1.java
Wed Apr 17 23:35:45 2013
@@ -0,0 +1,53 @@
+package org.apache.logging.log4j.core.async.perftest;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import com.lmax.disruptor.collections.Histogram;
+
+public class RunLog4j1 implements IPerfTestRunner {
+
+    @Override
+    public void runThroughputTest(int lines, Histogram histogram) {
+        long s1 = System.nanoTime();
+        Logger logger = LogManager.getLogger(getClass());
+        for (int j = 0; j < lines; j++) {
+            logger.info(THROUGHPUT_MSG);
+        }
+        long s2 = System.nanoTime();
+        long opsPerSec = (1000L * 1000L * 1000L * lines) / (s2 - s1);
+        histogram.addObservation(opsPerSec);
+    }
+
+    @Override
+    public void runLatencyTest(int samples, Histogram histogram,
+            long nanoTimeCost, int threadCount) {
+        Logger logger = LogManager.getLogger(getClass());
+        for (int i = 0; i < samples; i++) {
+            long s1 = System.nanoTime();
+            logger.info(LATENCY_MSG);
+            long s2 = System.nanoTime();
+            long value = s2 - s1 - nanoTimeCost;
+            if (value > 0) {
+                histogram.addObservation(value);
+            }
+            // wait 1 microsec
+            final long PAUSE_NANOS = 10000 * threadCount;
+            long pauseStart = System.nanoTime();
+            while (PAUSE_NANOS > (System.nanoTime() - pauseStart)) {
+                // busy spin
+            }
+        }
+    }
+
+    @Override
+    public void shutdown() {
+        LogManager.shutdown();
+    }
+
+    @Override
+    public void log(String finalMessage) {
+        Logger logger = LogManager.getLogger(getClass());
+        logger.info(finalMessage);
+    }
+}

Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j2.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j2.java?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j2.java
(added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLog4j2.java
Wed Apr 17 23:35:45 2013
@@ -0,0 +1,57 @@
+package org.apache.logging.log4j.core.async.perftest;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.LifeCycle;
+
+import com.lmax.disruptor.collections.Histogram;
+
+public class RunLog4j2 implements IPerfTestRunner {
+
+    @Override
+    public void runThroughputTest(int lines, Histogram histogram) {
+        long s1 = System.nanoTime();
+        Logger logger = LogManager.getLogger(getClass());
+        for (int j = 0; j < lines; j++) {
+            logger.info(THROUGHPUT_MSG);
+        }
+        long s2 = System.nanoTime();
+        long opsPerSec = (1000L * 1000L * 1000L * lines) / (s2 - s1);
+        histogram.addObservation(opsPerSec);
+    }
+
+
+    @Override
+    public void runLatencyTest(int samples, Histogram histogram,
+            long nanoTimeCost, int threadCount) {
+        Logger logger = LogManager.getLogger(getClass());
+        for (int i = 0; i < samples; i++) {
+            long s1 = System.nanoTime();
+            logger.info(LATENCY_MSG);
+            long s2 = System.nanoTime();
+            long value = s2 - s1 - nanoTimeCost;
+            if (value > 0) {
+                histogram.addObservation(value);
+            }
+            // wait 1 microsec
+            final long PAUSE_NANOS = 10000 * threadCount;
+            long pauseStart = System.nanoTime();
+            while (PAUSE_NANOS > (System.nanoTime() - pauseStart)) {
+                // busy spin
+            }
+        }
+    }
+
+
+    @Override
+    public void shutdown() {
+        ((LifeCycle) LogManager.getContext()).stop(); // stop async thread
+    }
+
+
+    @Override
+    public void log(String finalMessage) {
+        Logger logger = LogManager.getLogger(getClass());
+        logger.info(finalMessage);
+    }
+}

Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLogback.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLogback.java?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLogback.java
(added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/async/perftest/RunLogback.java
Wed Apr 17 23:35:45 2013
@@ -0,0 +1,55 @@
+package org.apache.logging.log4j.core.async.perftest;
+
+import org.slf4j.LoggerFactory;
+
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.core.spi.LifeCycle;
+
+import com.lmax.disruptor.collections.Histogram;
+
+public class RunLogback implements IPerfTestRunner {
+
+	@Override
+	public void runThroughputTest(int lines, Histogram histogram) {
+		long s1 = System.nanoTime();
+		Logger logger = (Logger) LoggerFactory.getLogger(getClass());
+		for (int j = 0; j < lines; j++) {
+			logger.info(THROUGHPUT_MSG);
+		}
+		long s2 = System.nanoTime();
+		long opsPerSec = (1000L * 1000L * 1000L * lines) / (s2 - s1);
+		histogram.addObservation(opsPerSec);
+	}
+
+	@Override
+	public void runLatencyTest(int samples, Histogram histogram,
+			long nanoTimeCost, int threadCount) {
+		Logger logger = (Logger) LoggerFactory.getLogger(getClass());
+		for (int i = 0; i < samples; i++) {
+			long s1 = System.nanoTime();
+			logger.info(LATENCY_MSG);
+			long s2 = System.nanoTime();
+			long value = s2 - s1 - nanoTimeCost;
+			if (value > 0) {
+				histogram.addObservation(value);
+			}
+			// wait 1 microsec
+			final long PAUSE_NANOS = 10000 * threadCount;
+			long pauseStart = System.nanoTime();
+			while (PAUSE_NANOS > (System.nanoTime() - pauseStart)) {
+				// busy spin
+			}
+		}
+	}
+
+	@Override
+	public void shutdown() {
+		((LifeCycle) LoggerFactory.getILoggerFactory()).stop();
+	}
+
+	@Override
+	public void log(String msg) {
+		Logger logger = (Logger) LoggerFactory.getLogger(getClass());
+		logger.info(msg);
+	}
+}

Added: logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerConfigTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerConfigTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerConfigTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerConfigTest.xml Wed Apr 17
23:35:45 2013
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <File name="File" fileName="target/AsyncLoggerConfigTest.log" bufferedIO="false" immediateFlush="true"
append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %location %ex%n</pattern>
+      </PatternLayout>
+    </File>
+  </appenders>
+  
+  <loggers>
+    <asyncLogger name="com.foo.Bar" level="trace" includeLocation="false">
+      <appender-ref ref="File"/>
+    </asyncLogger>
+    <root level="info">
+      <appender-ref ref="File"/>
+    </root>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerLocationTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerLocationTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerLocationTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerLocationTest.xml Wed Apr
17 23:35:45 2013
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="target/AsyncLoggerLocationTest.log" 
+	    		immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %location %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  
+  <loggers>
+    <root level="info" includeLocation="true">
+      <appender-ref ref="FastFile"/>
+    </root>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/AsyncLoggerTest.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="target/AsyncLoggerTest.log" 
+	    		immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %location %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="FastFile"/>
+    </root>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderLocationTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderLocationTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderLocationTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderLocationTest.xml Wed
Apr 17 23:35:45 2013
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="target/FastFileAppenderLocationTest.log" immediateFlush="false"
append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %location %ex%n</pattern>
+        <!--  
+        <pattern>%d %p %c{1.} %C %location %line [%t] %X{aKey} %m %ex%n</pattern>
+        -->
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  
+  <loggers>
+    <asyncRoot level="info" includeLocation="true">
+      <appender-ref ref="FastFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/FastFileAppenderTest.xml Wed Apr 17
23:35:45 2013
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="target/FastFileAppenderTest.log" immediateFlush="false"
append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %location %ex%n</pattern>
+        <!--  
+        <pattern>%d %p %c{1.} %C %location %line [%t] %X{aKey} %m %ex%n</pattern>
+        -->
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  
+  <loggers>
+    <asyncRoot level="info" includeLocation="false">
+      <appender-ref ref="FastFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderLocationTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderLocationTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderLocationTest.xml
(added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderLocationTest.xml
Wed Apr 17 23:35:45 2013
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastRollingFile name="FastRollingFile" fileName="target/FastRollingFileAppenderLocationTest.log"
+                 filePattern="test-%d{MM-dd-yyyy}-%i.log.gz" append="false"
+                 immediateFlush="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %location %ex%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+    </FastRollingFile>
+  </appenders>
+  
+  <loggers>
+    <asyncRoot level="info" includeLocation="true">
+      <appender-ref ref="FastRollingFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderTest.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderTest.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/FastRollingFileAppenderTest.xml Wed
Apr 17 23:35:45 2013
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastRollingFile name="FastRollingFile" fileName="target/FastRollingFileAppenderTest.log"
+                 filePattern="target/afterRollover-%i.log" append="false"
+                 immediateFlush="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %location %ex%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="250 B"/>
+      </Policies>
+    </FastRollingFile>
+  </appenders>
+  
+  <loggers>
+    <asyncRoot level="info" includeLocation="false">
+      <appender-ref ref="FastRollingFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/log4j.dtd
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j.dtd?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j.dtd (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j.dtd Wed Apr 17 23:35:45 2013
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- log4j-1.2.dtd is included in the log4perl distribution
+for your convenience.  The log4perl dtd is based on this 
+version of the log4j.dtd -->
+
+<!-- Authors: Chris Taylor, Ceki Gulcu. -->
+
+<!-- Version: 1.2 -->
+
+<!-- A configuration element consists of optional renderer
+elements,appender elements, categories and an optional root
+element. -->
+
+<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?,
+                               categoryFactory?)>
+
+<!-- The "threshold" attribute takes a level value such that all -->
+<!-- logging statements with a level equal or below this value are -->
+<!-- disabled. -->
+
+<!-- Setting the "debug" enable the printing of internal log4j logging   -->
+<!-- statements.                                                         -->
+
+<!-- By default, debug attribute is "null", meaning that we not do touch -->
+<!-- internal log4j logging settings. The "null" value for the threshold -->
+<!-- attribute can be misleading. The threshold field of a repository	 -->
+<!-- cannot be set to null. The "null" value for the threshold attribute -->
+<!-- simply means don't touch the threshold field, the threshold field   --> 
+<!-- keeps its old value.                                                -->
+     
+<!ATTLIST log4j:configuration
+  xmlns:log4j              CDATA #FIXED "http://jakarta.apache.org/log4j/" 
+  threshold                (all|debug|info|warn|error|fatal|off|null) "null"
+  debug                    (true|false|null)  "null"
+>
+
+<!-- renderer elements allow the user to customize the conversion of  -->
+<!-- message objects to String.                                       -->
+
+<!ELEMENT renderer EMPTY>
+<!ATTLIST renderer
+  renderedClass  CDATA #REQUIRED
+  renderingClass CDATA #REQUIRED
+>
+
+<!-- Appenders must have a name and a class. -->
+<!-- Appenders may contain an error handler, a layout, optional parameters -->
+<!-- and filters. They may also reference (or include) other appenders. -->
+<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
+<!ATTLIST appender
+  name 		ID 	#REQUIRED
+  class 	CDATA	#REQUIRED
+>
+
+<!ELEMENT layout (param*)>
+<!ATTLIST layout
+  class		CDATA	#REQUIRED
+>
+
+<!ELEMENT filter (param*)>
+<!ATTLIST filter
+  class		CDATA	#REQUIRED
+>
+
+<!-- ErrorHandlers can be of any class. They can admit any number of -->
+<!-- parameters. -->
+
+<!ELEMENT errorHandler (param*, root-ref?, logger-ref*,  appender-ref?)> 
+<!ATTLIST errorHandler
+   class        CDATA   #REQUIRED 
+>
+
+<!ELEMENT root-ref EMPTY>
+
+<!ELEMENT logger-ref EMPTY>
+<!ATTLIST logger-ref
+  ref IDREF #REQUIRED
+>
+
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  name		CDATA   #REQUIRED
+  value		CDATA	#REQUIRED
+>
+
+
+<!-- The priority class is org.apache.log4j.Level by default -->
+<!ELEMENT priority (param*)>
+<!ATTLIST priority
+  class   CDATA	#IMPLIED
+  value	  CDATA #REQUIRED
+>
+
+<!-- The level class is org.apache.log4j.Level by default -->
+<!ELEMENT level (param*)>
+<!ATTLIST level
+  class   CDATA	#IMPLIED
+  value	  CDATA #REQUIRED
+>
+
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named category. -->
+<!ELEMENT category (param*,(priority|level)?,appender-ref*)>
+<!ATTLIST category
+  class         CDATA   #IMPLIED
+  name		CDATA	#REQUIRED
+  additivity	(true|false) "true"  
+>
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named logger. -->
+<!ELEMENT logger (level?,appender-ref*)>
+<!ATTLIST logger
+  name		ID	#REQUIRED
+  additivity	(true|false) "true"  
+>
+
+
+<!ELEMENT categoryFactory (param*)>
+<!ATTLIST categoryFactory 
+   class        CDATA #REQUIRED>
+
+<!ELEMENT appender-ref EMPTY>
+<!ATTLIST appender-ref
+  ref IDREF #REQUIRED
+>
+
+<!-- If no priority element is specified, then the configurator MUST not -->
+<!-- touch the priority of root. -->
+<!-- The root category always exists and cannot be subclassed. -->
+<!ELEMENT root (param*, (priority|level)?, appender-ref*)>
+
+
+<!-- ==================================================================== -->
+<!--                       A logging event                                -->
+<!-- ==================================================================== -->
+<!ELEMENT log4j:eventSet (log4j:event*)>
+<!ATTLIST log4j:eventSet
+  xmlns:log4j             CDATA #FIXED "http://jakarta.apache.org/log4j/" 
+  version                (1.1|1.2) "1.2" 
+  includesLocationInfo   (true|false) "true"
+>
+
+
+
+<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, 
+                       log4j:locationInfo?) >
+
+<!-- The timestamp format is application dependent. -->
+<!ATTLIST log4j:event
+    logger     CDATA #REQUIRED
+    level      CDATA #REQUIRED
+    thread     CDATA #REQUIRED
+    timestamp  CDATA #REQUIRED
+>
+
+<!ELEMENT log4j:message (#PCDATA)>
+<!ELEMENT log4j:NDC (#PCDATA)>
+
+<!ELEMENT log4j:throwable (#PCDATA)>
+
+<!ELEMENT log4j:locationInfo EMPTY>
+<!ATTLIST log4j:locationInfo
+  class  CDATA	#REQUIRED
+  method CDATA	#REQUIRED
+  file   CDATA	#REQUIRED
+  line   CDATA	#REQUIRED
+>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12-async.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12-async.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12-async.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12-async.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+    <appender name="File" class="org.apache.log4j.FileAppender">
+        <param name="File" value="perftest.log" />
+        <param name="BufferedIO" value="true"/>
+        <param name="Append" value="false" />
+        <layout class="org.apache.log4j.PatternLayout">
+          <param name="ConversionPattern" value="%d %p %c{1} [%t] %X{aKey} %m %n"/>
+        </layout>           
+     </appender>
+     <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+         <param name="BufferSize" value="262144"/>
+         <appender-ref ref="File"/>
+     </appender>
+  <root> 
+    <priority value="debug" /> 
+    <appender-ref ref="ASYNC" /> 
+  </root>
+</log4j:configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf-log4j12.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+    <appender name="File" class="org.apache.log4j.FileAppender">
+        <param name="File" value="perftest.log" />
+        <param name="BufferedIO" value="true"/>
+        <param name="Append" value="false" />
+        <layout class="org.apache.log4j.PatternLayout">
+          <param name="ConversionPattern" value="%d %p %c{1} [%t] %X{aKey} %m %n"/>
+        </layout>           
+     </appender>
+  <root> 
+    <priority value="debug" /> 
+    <appender-ref ref="File" /> 
+  </root>
+</log4j:configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback-async.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback-async.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback-async.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback-async.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,21 @@
+<configuration>
+
+  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+    <file>perftest.log</file>
+    <append>false</append>
+    <encoder>
+      <pattern>%d %p %c{1} [%t] %X{aKey} %m %ex%n</pattern>
+      <immediateFlush>false</immediateFlush>
+    </encoder>
+  </appender>
+  <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
+    <queueSize>262144</queueSize>
+    <discardingThreshold>0</discardingThreshold>
+    <includeCallerData>false</includeCallerData>
+    <appender-ref ref="FILE" />
+  </appender>
+
+  <root level="debug">
+    <appender-ref ref="ASYNC" />
+  </root>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf-logback.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<configuration>
+
+  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+    <file>perftest.log</file>
+    <append>false</append>
+    <encoder>
+      <pattern>%d %p %c{1} [%t] %X{aKey} %m %ex%n</pattern>
+      <immediateFlush>false</immediateFlush>
+    </encoder>
+  </appender>
+
+  <root level="debug">
+    <appender-ref ref="FILE" />
+  </root>
+</configuration>
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFastFile.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFastFile.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFastFile.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFastFile.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m  %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="FastFile"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFile.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFile.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFile.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf1syncFile.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <File name="File" fileName="perftest.log" bufferedIO="true" immediateFlush="false"
append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m  %ex%n</pattern>
+      </PatternLayout>
+    </File>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="File"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFastFile.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFastFile.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFastFile.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFastFile.xml Wed Apr 17
23:35:45 2013
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastRollingFile name="FastRollingFile" fileName="perftest.log"
+                 filePattern="app-%d{MM-dd-yyyy}-%i.log.gz" append="false"
+                 immediateFlush="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+    </FastRollingFile>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="FastRollingFile"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFile.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFile.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFile.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf2syncRollFile.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <RollingFile name="RollingFile" fileName="perftest.log"
+                 filePattern="app-%d{MM-dd-yyyy}-%i.log.gz" append="false"
+                 bufferedIO="true" immediateFlush="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+    </RollingFile>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="RollingFile"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf3PlainNoLoc.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf3PlainNoLoc.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf3PlainNoLoc.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf3PlainNoLoc.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="FastFile"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf4PlainLocation.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf4PlainLocation.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf4PlainLocation.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf4PlainLocation.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} %C %location %line [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  <loggers>
+    <root level="info" includeLocation="true">
+      <appender-ref ref="FastFile"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf5AsyncApndNoLoc.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf5AsyncApndNoLoc.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf5AsyncApndNoLoc.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf5AsyncApndNoLoc.xml Wed Apr 17
23:35:45 2013
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+    <Asynch name="Asynch"  blocking="true" bufferSize="262144">
+      <appender-ref ref="FastFile"/>
+    </Asynch>
+  </appenders>  
+  <loggers>
+    <root level="info" includeLocation="false">
+      <appender-ref ref="Asynch"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf6AsyncApndLoc.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf6AsyncApndLoc.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf6AsyncApndLoc.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf6AsyncApndLoc.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} %C %location %line [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+    <Asynch name="Asynch" includeLocation="true" blocking="true" bufferSize="262144">
+      <appender-ref ref="FastFile"/>
+    </Asynch>
+  </appenders>  
+  <loggers>
+    <root level="info" includeLocation="true">
+      <appender-ref ref="Asynch"/>
+    </root>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf7MixedNoLoc.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf7MixedNoLoc.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf7MixedNoLoc.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf7MixedNoLoc.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} [%t] %X{aKey} %m  %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  <loggers>
+    <asyncRoot level="info" includeLocation="false">
+      <appender-ref ref="FastFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>

Added: logging/log4j/log4j2/trunk/core/src/test/resources/perf8MixedLoc.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/perf8MixedLoc.xml?rev=1469103&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/perf8MixedLoc.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/perf8MixedLoc.xml Wed Apr 17 23:35:45
2013
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration status="OFF">
+  <appenders>
+    <FastFile name="FastFile" fileName="perftest.log" immediateFlush="false" append="false">
+      <PatternLayout>
+        <pattern>%d %p %c{1.} %C %location %line [%t] %X{aKey} %m %ex%n</pattern>
+      </PatternLayout>
+    </FastFile>
+  </appenders>
+  <loggers>
+    <asyncRoot level="info" includeLocation="true">
+      <appender-ref ref="FastFile"/>
+    </asyncRoot>
+  </loggers>
+</configuration>
\ No newline at end of file



Mime
View raw message