diff --git a/spring-data-log4j-appender/pom.xml b/spring-data-log4j-appender/pom.xml
new file mode 100644
index 000000000..d73e5e185
--- /dev/null
+++ b/spring-data-log4j-appender/pom.xml
@@ -0,0 +1,163 @@
+
+ 4.0.0
+
+ org.springframework.data
+ spring-data-document-parent
+ 1.0.0.BUILD-SNAPSHOT
+ ../spring-data-document-parent/pom.xml
+
+ spring-data-log4j-appender
+ jar
+ Spring Data MongoDB Log4J Appender
+
+
+ 2.3
+
+
+
+
+
+
+ org.springframework
+ spring-beans
+
+
+ org.springframework
+ spring-tx
+
+
+ org.springframework
+ spring-expression
+
+
+ org.springframework
+ spring-test
+ test
+
+
+
+
+ org.springframework.data
+ spring-data-document-core
+ ${project.version}
+
+
+ org.springframework.data
+ spring-data-commons-core
+ ${data.commons.version}
+
+
+
+
+ org.mongodb
+ mongo-java-driver
+ ${mongo.version}
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.slf4j
+ jcl-over-slf4j
+ compile
+
+
+ org.slf4j
+ slf4j-log4j12
+ runtime
+
+
+ log4j
+ log4j
+
+
+ javax.mail
+ mail
+
+
+ javax.jms
+ jms
+
+
+ com.sun.jdmk
+ jmxtools
+
+
+ com.sun.jmx
+ jmxri
+
+
+ compile
+
+
+
+
+ org.mockito
+ mockito-all
+ test
+
+
+
+ org.hamcrest
+ hamcrest-all
+ 1.1
+ test
+
+
+
+ junit
+ junit
+ test
+
+
+
+ joda-time
+ joda-time
+ 1.6
+ test
+
+
+
+
+
+
+ com.springsource.bundlor
+ com.springsource.bundlor.maven
+
+
+
+ com.mysema.maven
+ maven-apt-plugin
+ 1.0
+
+
+ generate-test-sources
+
+ test-process
+
+
+ target/generated-sources/test-annotations
+ org.springframework.data.document.mongodb.repository.MongoAnnotationProcessor
+
+
+
+
+
+
+
+
+
+ querydsl
+ Mysema QueryDsl
+ http://source.mysema.com/maven2/releases
+
+ false
+
+
+
+
diff --git a/spring-data-log4j-appender/src/main/java/org/springframework/data/document/mongodb/log4j/MongoLog4jAppender.java b/spring-data-log4j-appender/src/main/java/org/springframework/data/document/mongodb/log4j/MongoLog4jAppender.java
new file mode 100644
index 000000000..0620be138
--- /dev/null
+++ b/spring-data-log4j-appender/src/main/java/org/springframework/data/document/mongodb/log4j/MongoLog4jAppender.java
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2011 by the original author(s).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.data.document.mongodb.log4j;
+
+import java.net.UnknownHostException;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Map;
+
+import com.mongodb.BasicDBList;
+import com.mongodb.BasicDBObject;
+import com.mongodb.DB;
+import com.mongodb.Mongo;
+import com.mongodb.WriteConcern;
+import org.apache.log4j.AppenderSkeleton;
+import org.apache.log4j.Level;
+import org.apache.log4j.spi.LoggingEvent;
+
+/**
+ * @author Jon Brisbin
+ */
+public class MongoLog4jAppender extends AppenderSkeleton {
+
+ public static final String LEVEL = "level";
+ public static final String NAME = "name";
+ public static final String TIMESTAMP = "timestamp";
+ public static final String PROPERTIES = "properties";
+ public static final String TRACEBACK = "traceback";
+ public static final String MESSAGE = "message";
+
+ protected String host = "localhost";
+ protected int port = 27017;
+ protected String database = "logs";
+ protected String collection = null;
+ protected Mongo mongo;
+ protected DB db;
+
+ public MongoLog4jAppender() {
+ }
+
+ public MongoLog4jAppender(boolean isActive) {
+ super(isActive);
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getDatabase() {
+ return database;
+ }
+
+ public void setDatabase(String database) {
+ this.database = database;
+ }
+
+ public String getCollection() {
+ return collection;
+ }
+
+ public void setCollection(String collection) {
+ this.collection = collection;
+ }
+
+ protected void connectToMongo() throws UnknownHostException {
+ this.mongo = new Mongo(host, port);
+ this.db = mongo.getDB(database);
+ }
+
+ @SuppressWarnings({"unchecked"})
+ @Override
+ protected void append(final LoggingEvent event) {
+ if (null == db) {
+ try {
+ connectToMongo();
+ } catch (UnknownHostException e) {
+ throw new RuntimeException(e.getMessage(), e);
+ }
+ }
+
+ BasicDBObject dbo = new BasicDBObject();
+ dbo.put(NAME, event.getLogger().getName());
+ dbo.put(LEVEL, event.getLevel().toString());
+ dbo.put(TIMESTAMP, String.format("%s", event.getTimeStamp()));
+
+ // Copy properties into document
+ Map