You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ni...@apache.org on 2013/05/13 00:52:11 UTC
svn commit: r1481664 [2/2] - in /logging/log4j/log4j2/trunk: ./ core/
core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/
core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/converter/
core/src/test/java/org/apache/logging/lo...
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverterTest.java?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverterTest.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextStackJsonAttributeConverterTest.java Sun May 12 22:52:10 2013
@@ -0,0 +1,52 @@
+package org.apache.logging.log4j.core.appender.db.jpa.converter;
+
+import org.apache.logging.log4j.ThreadContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+import static org.junit.Assert.*;
+
+public class ContextStackJsonAttributeConverterTest {
+ private ContextStackJsonAttributeConverter converter;
+
+ @Before
+ public void setUp() {
+ this.converter = new ContextStackJsonAttributeConverter();
+ }
+
+ @After
+ public void tearDown() {
+
+ }
+
+ @Test
+ public void testConvert01() {
+ ThreadContext.ContextStack stack = new ThreadContext.ImmutableStack(Arrays.asList("value1", "another2"));
+
+ String converted = this.converter.convertToDatabaseColumn(stack);
+
+ assertNotNull("The converted value should not be null.", converted);
+
+ ThreadContext.ContextStack reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", stack.asList(), reversed.asList());
+ }
+
+ @Test
+ public void testConvert02() {
+ ThreadContext.ContextStack stack = new ThreadContext.ImmutableStack(Arrays.asList("key1", "value2", "my3"));
+
+ String converted = this.converter.convertToDatabaseColumn(stack);
+
+ assertNotNull("The converted value should not be null.", converted);
+
+ ThreadContext.ContextStack reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", stack.asList(), reversed.asList());
+ }
+}
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverterTest.java?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverterTest.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MarkerAttributeConverterTest.java Sun May 12 22:52:10 2013
@@ -0,0 +1,62 @@
+package org.apache.logging.log4j.core.appender.db.jpa.converter;
+
+import org.apache.logging.log4j.Marker;
+import org.apache.logging.log4j.MarkerManager;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class MarkerAttributeConverterTest {
+ private MarkerAttributeConverter converter;
+
+ @Before
+ public void setUp() {
+ this.converter = new MarkerAttributeConverter();
+ }
+
+ @After
+ public void tearDown() {
+
+ }
+
+ @Test
+ public void testConvert01() {
+ Marker marker = MarkerManager.getMarker("testConvert01");
+
+ String converted = this.converter.convertToDatabaseColumn(marker);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.", "testConvert01", converted);
+
+ Marker reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", "testConvert01", marker.getName());
+ }
+
+ @Test
+ public void testConvert02() {
+ Marker marker = MarkerManager.getMarker("testConvert02",
+ MarkerManager.getMarker("anotherConvert02",
+ MarkerManager.getMarker("finalConvert03")
+ )
+ );
+
+ String converted = this.converter.convertToDatabaseColumn(marker);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.", "testConvert02[ anotherConvert02[ finalConvert03 ] ] ]",
+ converted);
+
+ Marker reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", "testConvert02", marker.getName());
+ assertNotNull("The first parent should not be null.", marker.getParent());
+ assertEquals("The first parent is not correct.", "anotherConvert02", marker.getParent().getName());
+ assertNotNull("The second parent should not be null.", marker.getParent().getParent());
+ assertEquals("The second parent is not correct.", "finalConvert03", marker.getParent().getParent().getName());
+ }
+}
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MessageAttributeConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MessageAttributeConverterTest.java?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MessageAttributeConverterTest.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/MessageAttributeConverterTest.java Sun May 12 22:52:10 2013
@@ -0,0 +1,40 @@
+package org.apache.logging.log4j.core.appender.db.jpa.converter;
+
+import org.apache.logging.log4j.message.Message;
+import org.apache.logging.log4j.status.StatusLogger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class MessageAttributeConverterTest {
+ private static final StatusLogger log = StatusLogger.getLogger();
+
+ private MessageAttributeConverter converter;
+
+ @Before
+ public void setUp() {
+ this.converter = new MessageAttributeConverter();
+ }
+
+ @After
+ public void tearDown() {
+
+ }
+
+ @Test
+ public void testConvert01() {
+ Message message = log.getMessageFactory().newMessage("Message #{} said [{}].", 3, "Hello");
+
+ String converted = this.converter.convertToDatabaseColumn(message);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.", "Message #3 said [Hello].", converted);
+
+ Message reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", "Message #3 said [Hello].", reversed.getFormattedMessage());
+ }
+}
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverterTest.java?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverterTest.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverterTest.java Sun May 12 22:52:10 2013
@@ -0,0 +1,108 @@
+package org.apache.logging.log4j.core.appender.db.jpa.converter;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class StackTraceElementAttributeConverterTest {
+ private StackTraceElementAttributeConverter converter;
+
+ @Before
+ public void setUp() {
+ this.converter = new StackTraceElementAttributeConverter();
+ }
+
+ @After
+ public void tearDown() {
+
+ }
+
+ @Test
+ public void testConvert01() {
+ StackTraceElement element = new StackTraceElement("TestNoPackage", "testConvert01", "TestNoPackage.java", 1234);
+
+ String converted = this.converter.convertToDatabaseColumn(element);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.", "TestNoPackage.testConvert01(TestNoPackage.java:1234)",
+ converted);
+
+ StackTraceElement reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The class name is not correct.", "TestNoPackage", reversed.getClassName());
+ assertEquals("The method name is not correct.", "testConvert01", reversed.getMethodName());
+ assertEquals("The file name is not correct.", "TestNoPackage.java", reversed.getFileName());
+ assertEquals("The line number is not correct.", 1234, reversed.getLineNumber());
+ assertFalse("The native flag should be false.", reversed.isNativeMethod());
+ }
+
+ @Test
+ public void testConvert02() {
+ StackTraceElement element = new StackTraceElement("org.apache.logging.TestWithPackage",
+ "testConvert02", "TestWithPackage.java", -1);
+
+ String converted = this.converter.convertToDatabaseColumn(element);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.",
+ "org.apache.logging.TestWithPackage.testConvert02(TestWithPackage.java)",
+ converted);
+
+ StackTraceElement reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The class name is not correct.", "org.apache.logging.TestWithPackage", reversed.getClassName());
+ assertEquals("The method name is not correct.", "testConvert02", reversed.getMethodName());
+ assertEquals("The file name is not correct.", "TestWithPackage.java", reversed.getFileName());
+ assertEquals("The line number is not correct.", -1, reversed.getLineNumber());
+ assertFalse("The native flag should be false.", reversed.isNativeMethod());
+ }
+
+ @Test
+ public void testConvert03() {
+ StackTraceElement element = new StackTraceElement("org.apache.logging.TestNoSource",
+ "testConvert03", null, -1);
+
+ String converted = this.converter.convertToDatabaseColumn(element);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.",
+ "org.apache.logging.TestNoSource.testConvert03(Unknown Source)",
+ converted);
+
+ StackTraceElement reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The class name is not correct.", "org.apache.logging.TestNoSource", reversed.getClassName());
+ assertEquals("The method name is not correct.", "testConvert03", reversed.getMethodName());
+ assertEquals("The file name is not correct.", null, reversed.getFileName());
+ assertEquals("The line number is not correct.", -1, reversed.getLineNumber());
+ assertFalse("The native flag should be false.", reversed.isNativeMethod());
+ }
+
+ @Test
+ public void testConvert04() {
+ StackTraceElement element = new StackTraceElement("org.apache.logging.TestIsNativeMethod",
+ "testConvert04", null, -2);
+
+ String converted = this.converter.convertToDatabaseColumn(element);
+
+ assertNotNull("The converted value should not be null.", converted);
+ assertEquals("The converted value is not correct.",
+ "org.apache.logging.TestIsNativeMethod.testConvert04(Native Method)",
+ converted);
+
+ StackTraceElement reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The class name is not correct.", "org.apache.logging.TestIsNativeMethod",
+ reversed.getClassName());
+ assertEquals("The method name is not correct.", "testConvert04", reversed.getMethodName());
+ assertEquals("The file name is not correct.", null, reversed.getFileName());
+ assertEquals("The line number is not correct.", -2, reversed.getLineNumber());
+ assertTrue("The native flag should be true.", reversed.isNativeMethod());
+ }
+}
Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java Sun May 12 22:52:10 2013
@@ -0,0 +1,73 @@
+package org.apache.logging.log4j.core.appender.db.jpa.converter;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.sql.SQLException;
+
+import static org.junit.Assert.*;
+
+public class ThrowableAttributeConverterTest {
+ private ThrowableAttributeConverter converter;
+
+ @Before
+ public void setUp() {
+ this.converter = new ThrowableAttributeConverter();
+ }
+
+ @After
+ public void tearDown() {
+
+ }
+
+ @Test
+ public void testConvert01() {
+ RuntimeException exception = new RuntimeException("My message 01.");
+
+ String stackTrace = getStackTrace(exception);
+
+ String converted = this.converter.convertToDatabaseColumn(exception);
+
+ assertNotNull("The converted value is not correct.", converted);
+ assertEquals("The converted value is not correct.", stackTrace, converted);
+
+ Throwable reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", stackTrace, getStackTrace(reversed));
+ }
+
+ @Test
+ public void testConvert02() {
+ SQLException cause2 = new SQLException("This is a test cause.");
+ Error cause1 = new Error(cause2);
+ RuntimeException exception = new RuntimeException("My message 01.", cause1);
+
+ String stackTrace = getStackTrace(exception);
+
+ String converted = this.converter.convertToDatabaseColumn(exception);
+
+ assertNotNull("The converted value is not correct.", converted);
+ assertEquals("The converted value is not correct.", stackTrace, converted);
+
+ Throwable reversed = this.converter.convertToEntityAttribute(converted);
+
+ assertNotNull("The reversed value should not be null.", reversed);
+ assertEquals("The reversed value is not correct.", stackTrace, getStackTrace(reversed));
+ }
+
+ private static String getStackTrace(Throwable throwable) {
+ String returnValue = throwable.toString() + "\n";
+
+ for (StackTraceElement element : throwable.getStackTrace()) {
+ returnValue += "\tat " + element.toString() + "\n";
+ }
+
+ if (throwable.getCause() != null) {
+ returnValue += "Caused by " + getStackTrace(throwable.getCause());
+ }
+
+ return returnValue;
+ }
+}
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml?rev=1481664&r1=1481663&r2=1481664&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/META-INF/persistence.xml Sun May 12 22:52:10 2013
@@ -23,8 +23,9 @@
version="1.0">
<persistence-unit name="jpaAppenderTestUnit">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>org.apache.logging.log4j.core.appender.db.jpa.TestEntity</class>
+ <!--<class>org.apache.logging.log4j.core.appender.db.jpa.TestBasicEntity</class>-->
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.connection.username" value="sa" />
Added: logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml Sun May 12 22:52:10 2013
@@ -0,0 +1,45 @@
+<?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">
+
+ <appenders>
+ <Console name="STDOUT">
+ <PatternLayout pattern="%C{1.} %m %level MDC%X%n"/>
+ </Console>
+ <Jdbc name="databaseAppender" tableName="dsLogEntry">
+ <DataSource jndiName="java:/comp/env/jdbc/TestDataSourceAppender" />
+ <Column name="eventDate" isEventTimestamp="true" />
+ <Column name="literalColumn" literal="'Literal Value of Data Source'" />
+ <Column name="level" pattern="%level" />
+ <Column name="logger" pattern="%logger" />
+ <Column name="message" pattern="%message" />
+ <Column name="exception" pattern="%ex{full}" />
+ </Jdbc>
+ </appenders>
+
+ <loggers>
+ <logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+ <appender-ref ref="databaseAppender" />
+ </logger>
+
+ <root level="error">
+ <appender-ref ref="STDOUT"/>
+ </root>
+ </loggers>
+
+</configuration>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml?rev=1481664&r1=1481663&r2=1481664&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-driver-manager.xml Sun May 12 22:52:10 2013
@@ -14,7 +14,6 @@
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">
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml?rev=1481664&r1=1481663&r2=1481664&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-factory-method.xml Sun May 12 22:52:10 2013
@@ -14,7 +14,6 @@
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">
Copied: logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-base.xml (from r1481329, logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa.xml)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-base.xml?p2=logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-base.xml&p1=logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa.xml&r1=1481329&r2=1481664&rev=1481664&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-base.xml Sun May 12 22:52:10 2013
@@ -14,7 +14,6 @@
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">
Added: logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-basic.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-basic.xml?rev=1481664&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-basic.xml (added)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-jpa-basic.xml Sun May 12 22:52:10 2013
@@ -0,0 +1,38 @@
+<?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">
+
+ <appenders>
+ <Console name="STDOUT">
+ <PatternLayout pattern="%C{1.} %m %level MDC%X%n"/>
+ </Console>
+ <Jpa name="databaseAppender" persistenceUnitName="jpaAppenderTestUnit"
+ entityClassName="org.apache.logging.log4j.core.appender.db.jpa.TestBasicEntity" />
+ </appenders>
+
+ <loggers>
+ <logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+ <appender-ref ref="databaseAppender" />
+ </logger>
+
+ <root level="error">
+ <appender-ref ref="STDOUT"/>
+ </root>
+ </loggers>
+
+</configuration>
Modified: logging/log4j/log4j2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/pom.xml?rev=1481664&r1=1481663&r2=1481664&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/pom.xml (original)
+++ logging/log4j/log4j2/trunk/pom.xml Sun May 12 22:52:10 2013
@@ -298,12 +298,12 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
- <version>4.1.9.Final</version>
+ <version>4.3.0.Beta2</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <version>1.0.1.Final</version>
+ <artifactId>hibernate-jpa-2.1-api</artifactId>
+ <version>1.0.0.Draft-16</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>