logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1592395 - in /logging/log4j/log4j2/trunk: ./ log4j-core/ log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ log4j-core/src/main/java/org/apache/logging/log4j/core/web/ log4j-core/src/main/resources/META-INF/services/ log4j-core...
Date Sun, 04 May 2014 17:49:13 GMT
Author: mattsicker
Date: Sun May  4 17:49:12 2014
New Revision: 1592395

URL: http://svn.apache.org/r1592395
Log:
Initial migration of servlet code to log4j-web.

  - Moved classes and tests.
  - Updated Interpolator to reference the new FQCN.
  - Documentation still needs to be updated.

Added:
    logging/log4j/log4j2/trunk/log4j-web/
    logging/log4j/log4j2/trunk/log4j-web/pom.xml   (with props)
    logging/log4j/log4j2/trunk/log4j-web/src/
    logging/log4j/log4j2/trunk/log4j-web/src/main/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContainerInitializer.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializer.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContextListener.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletFilter.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletFilter.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializer.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializer.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImpl.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebSupport.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebSupport.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/package-info.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/package-info.java
    logging/log4j/log4j2/trunk/log4j-web/src/main/resources/
    logging/log4j/log4j2/trunk/log4j-web/src/test/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializerTest.java
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContextListenerTest.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContextListenerTest.java
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletFilterTest.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletFilterTest.java
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImplTest.java
    logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/WebLookupTest.java
      - copied, changed from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/WebLookupTest.java
Removed:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/
Modified:
    logging/log4j/log4j2/trunk/log4j-core/pom.xml
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
    logging/log4j/log4j2/trunk/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
    logging/log4j/log4j2/trunk/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
    logging/log4j/log4j2/trunk/pom.xml

Modified: logging/log4j/log4j2/trunk/log4j-core/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/pom.xml?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/pom.xml (original)
+++ logging/log4j/log4j2/trunk/log4j-core/pom.xml Sun May  4 17:49:12 2014
@@ -86,13 +86,6 @@
       <artifactId>javax.mail</artifactId>
       <optional>true</optional>
     </dependency>
-    <!-- Used for web container support -->
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <version>3.0.1</version>
-      <scope>provided</scope>
-    </dependency>
     <!-- Used for JPA appenders (needs an implementation of course) -->
     <dependency>
       <groupId>org.eclipse.persistence</groupId>

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
Sun May  4 17:49:12 2014
@@ -69,15 +69,21 @@ public class Interpolator implements Str
      */
     public Interpolator(final Map<String, String> properties) {
         this.defaultLookup = new MapLookup(properties == null ? new HashMap<String, String>()
: properties);
+        // TODO: this ought to use the PluginManager
         lookups.put("sys", new SystemPropertiesLookup());
         lookups.put("env", new EnvironmentLookup());
         lookups.put("jndi", new JndiLookup());
         lookups.put("date", new DateLookup());
         lookups.put("ctx", new ContextMapLookup());
         if (Loader.isClassAvailable("javax.servlet.ServletContext")) {
-            lookups.put("web", new WebLookup());
+            try {
+                lookups.put("web",
+                    Loader.newCheckedInstanceOf("org.apache.logging.log4j.web.WebLookup",
StrLookup.class));
+            } catch (final Exception e) {
+                LOGGER.warn("ServletContext is available, but log4j-web is not.", e);
+            }
         } else {
-            LOGGER.error("Unable to locate ServletContext");
+            LOGGER.info("Not in a ServletContext environment, thus not loading WebLookup
plugin.");
         }
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer
Sun May  4 17:49:12 2014
@@ -1 +1 @@
-org.apache.logging.log4j.core.web.Log4jServletContainerInitializer
\ No newline at end of file
+org.apache.logging.log4j.web.Log4jServletContainerInitializer
\ No newline at end of file

Modified: logging/log4j/log4j2/trunk/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
(original)
+++ logging/log4j/log4j2/trunk/log4j-samples/flume-embedded/src/main/webapp/WEB-INF/web.xml
Sun May  4 17:49:12 2014
@@ -46,7 +46,7 @@
 	</session-config>
 
 	<listener>
-		<listener-class>org.apache.logging.log4j.core.web.Log4jServletContextListener</listener-class>
+		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
 	</listener>
 
 	<context-param>

Modified: logging/log4j/log4j2/trunk/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
(original)
+++ logging/log4j/log4j2/trunk/log4j-samples/flume-remote/src/main/webapp/WEB-INF/web.xml
Sun May  4 17:49:12 2014
@@ -46,7 +46,7 @@
 	</session-config>
 
 	<listener>
-		<listener-class>org.apache.logging.log4j.core.web.Log4jServletContextListener</listener-class>
+		<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
 	</listener>
 
 	<context-param>

Added: logging/log4j/log4j2/trunk/log4j-web/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/pom.xml?rev=1592395&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-web/pom.xml (added)
+++ logging/log4j/log4j2/trunk/log4j-web/pom.xml Sun May  4 17:49:12 2014
@@ -0,0 +1,80 @@
+<?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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>log4j</artifactId>
+    <groupId>org.apache.logging.log4j</groupId>
+    <version>2.0-rc2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>log4j-web</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>javax.servlet-api</artifactId>
+      <version>3.0.1</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <type>test-jar</type>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>org.apache.logging.log4j.web</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

Propchange: logging/log4j/log4j2/trunk/log4j-web/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContainerInitializer.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializer.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContainerInitializer.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContainerInitializer.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializer.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializer.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContainerInitializer.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import java.util.EnumSet;
 import java.util.Set;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContextListener.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContextListener.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletContextListener.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletFilter.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletFilter.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletFilter.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletFilter.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletFilter.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jServletFilter.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jServletFilter.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import java.io.IOException;
 import javax.servlet.Filter;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializer.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializer.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializer.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializer.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializer.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializer.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializer.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import javax.servlet.UnavailableException;
 

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImpl.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImpl.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImpl.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import java.net.URI;
 import java.util.Map;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebSupport.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebSupport.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebSupport.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebSupport.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebSupport.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/Log4jWebSupport.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/Log4jWebSupport.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import org.apache.logging.log4j.spi.LoggerContext;
 

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java
Sun May  4 17:49:12 2014
@@ -14,16 +14,18 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.lookup;
+package org.apache.logging.log4j.web;
+// Please note that if you move this class, make sure to update the Interpolator class (if
still applicable) or remove
+// this comment if no longer relevant
 
+import javax.servlet.ServletContext;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.impl.ContextAnchor;
-
-import javax.servlet.ServletContext;
+import org.apache.logging.log4j.core.lookup.StrLookup;
 
 
 @Plugin(name = "web", category = "Lookup")

Copied: logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/package-info.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/package-info.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/package-info.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/package-info.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/package-info.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/web/package-info.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/main/java/org/apache/logging/log4j/web/package-info.java
Sun May  4 17:49:12 2014
@@ -19,4 +19,4 @@
  * The classes in this package are responsible for properly initializing and deinitializing
Log4j in a Java EE web
  * application.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializerTest.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializerTest.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContainerInitializerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
Sun May  4 17:49:12 2014
@@ -14,10 +14,11 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import java.util.EnumSet;
 import java.util.EventListener;
+
 import javax.servlet.DispatcherType;
 import javax.servlet.Filter;
 import javax.servlet.FilterRegistration;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContextListenerTest.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContextListenerTest.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContextListenerTest.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContextListenerTest.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContextListenerTest.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletContextListenerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContextListenerTest.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletFilterTest.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletFilterTest.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletFilterTest.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletFilterTest.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletFilterTest.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jServletFilterTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletFilterTest.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImplTest.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImplTest.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/Log4jWebInitializerImplTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
 
 import javax.servlet.ServletContext;
 import javax.servlet.UnavailableException;

Copied: logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/WebLookupTest.java
(from r1592374, logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/WebLookupTest.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/WebLookupTest.java?p2=logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/WebLookupTest.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/WebLookupTest.java&r1=1592374&r2=1592395&rev=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/web/WebLookupTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-web/src/test/java/org/apache/logging/log4j/web/WebLookupTest.java
Sun May  4 17:49:12 2014
@@ -14,7 +14,12 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.web;
+package org.apache.logging.log4j.web;
+
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+import javax.servlet.UnavailableException;
 
 import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -23,14 +28,8 @@ import org.apache.logging.log4j.core.con
 import org.apache.logging.log4j.core.impl.ContextAnchor;
 import org.apache.logging.log4j.core.lookup.StrSubstitutor;
 import org.junit.Test;
-
-import javax.servlet.ServletContext;
-import javax.servlet.UnavailableException;
-
 import org.springframework.mock.web.MockServletContext;
 
-import java.util.Map;
-
 import static org.junit.Assert.*;
 
 public class WebLookupTest {
@@ -56,16 +55,16 @@ public class WebLookupTest {
             assertNotNull("No Interpolator", substitutor);
             String value = substitutor.replace("${web:initParam.TestParam}");
             assertNotNull("No value for TestParam", value);
-            assertTrue("Incorrect value for TestParam: " + value, "ParamValue".equals(value));
+            assertEquals("Incorrect value for TestParam: " + value, "ParamValue", value);
             value = substitutor.replace("${web:attr.TestAttr}");
             assertNotNull("No value for TestAttr", value);
-            assertTrue("Incorrect value for TestAttr: " + value, "AttrValue".equals(value));
+            assertEquals("Incorrect value for TestAttr: " + value, "AttrValue", value);
             value = substitutor.replace("${web:Name1}");
             assertNotNull("No value for Name1", value);
-            assertTrue("Incorrect value for Name1: " + value, "Ben".equals(value));
+            assertEquals("Incorrect value for Name1: " + value, "Ben", value);
             value = substitutor.replace("${web:Name2}");
             assertNotNull("No value for Name2", value);
-            assertTrue("Incorrect value for Name2: " + value, "Jerry".equals(value));
+            assertEquals("Incorrect value for Name2: " + value, "Jerry", value);
         } catch (final UnavailableException e) {
             fail("Failed to initialize Log4j properly." + e.getMessage());
         }
@@ -94,7 +93,7 @@ public class WebLookupTest {
         for (Map.Entry<String, Appender> entry : appenders.entrySet()) {
             if (entry.getKey().equals("file")) {
                 FileAppender fa = (FileAppender) entry.getValue();
-                assertTrue("target/myapp.log".equals(fa.getFileName()));
+                assertEquals("target/myapp.log", fa.getFileName());
             }
         }
         initializer.deinitialize();

Modified: logging/log4j/log4j2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/pom.xml?rev=1592395&r1=1592394&r2=1592395&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/pom.xml (original)
+++ logging/log4j/log4j2/trunk/pom.xml Sun May  4 17:49:12 2014
@@ -900,6 +900,7 @@
     <module>log4j-samples</module>
     <module>log4j-bom</module>
     <module>log4j-nosql</module>
+    <module>log4j-web</module>
   </modules>
   <profiles>
     <profile>



Mime
View raw message