logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1465533 [1/2] - in /logging/log4j/log4j2/trunk: ./ api/ api/src/main/java/org/apache/logging/log4j/spi/ jcl-bridge/ log4j12-api/ samples/ samples/flume-common/ samples/flume-embedded/ samples/flume-remote/ src/changes/ src/site/ taglib/ ta...
Date Mon, 08 Apr 2013 04:08:11 GMT
Author: rgoers
Date: Mon Apr  8 04:08:10 2013
New Revision: 1465533

URL: http://svn.apache.org/r1465533
Log:
LOG4J2-187 - Add tag library

Added:
    logging/log4j/log4j2/trunk/taglib/   (with props)
    logging/log4j/log4j2/trunk/taglib/pom.xml
    logging/log4j/log4j2/trunk/taglib/src/
    logging/log4j/log4j2/trunk/taglib/src/main/
    logging/log4j/log4j2/trunk/taglib/src/main/java/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/CatchingTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DebugTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DumpTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/EntryTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ErrorTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExceptionAwareTagSupport.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExitTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/FatalTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/IfEnabledTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLoggerContext.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LogTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupport.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/SetLoggerTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TagUtils.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TraceTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.java
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/package-info.java
    logging/log4j/log4j2/trunk/taglib/src/main/resources/
    logging/log4j/log4j2/trunk/taglib/src/main/resources/META-INF/
    logging/log4j/log4j2/trunk/taglib/src/main/resources/META-INF/log.tld
    logging/log4j/log4j2/trunk/taglib/src/site/
    logging/log4j/log4j2/trunk/taglib/src/site/site.xml
    logging/log4j/log4j2/trunk/taglib/src/site/xdoc/
    logging/log4j/log4j2/trunk/taglib/src/site/xdoc/index.xml
Modified:
    logging/log4j/log4j2/trunk/api/pom.xml
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/log4j2/trunk/jcl-bridge/pom.xml
    logging/log4j/log4j2/trunk/log4j12-api/pom.xml
    logging/log4j/log4j2/trunk/pom.xml
    logging/log4j/log4j2/trunk/samples/flume-common/pom.xml
    logging/log4j/log4j2/trunk/samples/flume-embedded/pom.xml
    logging/log4j/log4j2/trunk/samples/flume-remote/pom.xml
    logging/log4j/log4j2/trunk/samples/pom.xml
    logging/log4j/log4j2/trunk/src/changes/changes.xml
    logging/log4j/log4j2/trunk/src/site/site.xml
    logging/log4j/log4j2/trunk/web/pom.xml
    logging/log4j/log4j2/trunk/web/src/site/site.xml
    logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml
    logging/log4j/log4j2/trunk/web/src/test/java/org/apache/logging/log4j/core/web/Log4jContextListenerTest.java

Modified: logging/log4j/log4j2/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/pom.xml (original)
+++ logging/log4j/log4j2/trunk/api/pom.xml Mon Apr  8 04:08:10 2013
@@ -43,7 +43,6 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java Mon Apr  8 04:08:10 2013
@@ -143,9 +143,7 @@ public abstract class AbstractLogger imp
      * @param t     The Throwable.
      */
     public void catching(final Level level, final Throwable t) {
-        if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
-            log(CATCHING_MARKER, FQCN, level, messageFactory.newMessage(CATCHING), t);
-        }
+        catching(FQCN, level, t);
     }
 
     /**
@@ -154,8 +152,19 @@ public abstract class AbstractLogger imp
      * @param t The Throwable.
      */
     public void catching(final Throwable t) {
-        if (isEnabled(Level.ERROR, CATCHING_MARKER, (Object) null, null)) {
-            log(CATCHING_MARKER, FQCN, Level.ERROR, messageFactory.newMessage(CATCHING), t);
+        catching(FQCN, Level.ERROR, t);
+    }
+
+    /**
+     * Logs a Throwable that has been caught with location information.
+     *
+     * @param fqcn The fully qualified class name of the <b>caller</b>.
+     * @param level The logging level.
+     * @param t The Throwable.
+     */
+    protected void catching(String fqcn, final Level level, final Throwable t) {
+        if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
+            log(CATCHING_MARKER, fqcn, level, messageFactory.newMessage(CATCHING), t);
         }
     }
 
@@ -348,9 +357,7 @@ public abstract class AbstractLogger imp
      * Logs entry to a method.
      */
     public void entry() {
-        if (isEnabled(Level.TRACE, ENTRY_MARKER, (Object) null, null)) {
-            log(ENTRY_MARKER, FQCN, Level.TRACE, messageFactory.newMessage(" entry"), null);
-        }
+        entry(FQCN);
     }
 
     /**
@@ -359,8 +366,18 @@ public abstract class AbstractLogger imp
      * @param params The parameters to the method.
      */
     public void entry(final Object... params) {
+        entry(FQCN, params);
+    }
+
+    /**
+     * Logs entry to a method with location information.
+     *
+     * @param fqcn The fully qualified class name of the <b>caller</b>.
+     * @param params The parameters to the method.
+     */
+    protected void entry(final String fqcn, final Object... params) {
         if (isEnabled(Level.TRACE, ENTRY_MARKER, (Object) null, null)) {
-            log(ENTRY_MARKER, FQCN, Level.TRACE, entryMsg(params.length, params), null);
+            log(ENTRY_MARKER, fqcn, Level.TRACE, entryMsg(params.length, params), null);
         }
     }
 
@@ -564,9 +581,7 @@ public abstract class AbstractLogger imp
      * Logs exit from a method.
      */
     public void exit() {
-        if (isEnabled(Level.TRACE, EXIT_MARKER, (Object) null, null)) {
-            log(EXIT_MARKER, FQCN, Level.TRACE, toExitMsg(null), null);
-        }
+        exit(FQCN, null);
     }
 
     /**
@@ -577,8 +592,19 @@ public abstract class AbstractLogger imp
      * @return the Throwable.
      */
     public <R> R exit(final R result) {
+        return exit(FQCN, result);
+    }
+
+    /**
+     * Logs exiting from a method with the result and location information.
+     *
+     * @param fqcn The fully qualified class name of the <b>caller</b>.
+     * @param <R> The type of the parameter and object being returned.
+     * @param result The result being returned from the method call.
+     */
+    protected <R> R exit(final String fqcn, final R result) {
         if (isEnabled(Level.TRACE, EXIT_MARKER, (Object) null, null)) {
-            log(EXIT_MARKER, FQCN, Level.TRACE, toExitMsg(result), null);
+            log(EXIT_MARKER, fqcn, Level.TRACE, toExitMsg(result), null);
         }
         return result;
     }
@@ -1346,10 +1372,7 @@ public abstract class AbstractLogger imp
      * @return the Throwable.
      */
     public <T extends Throwable> T throwing(final Level level, final T t) {
-        if (isEnabled(level, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, FQCN, level, messageFactory.newMessage(THROWING), t);
-        }
-        return t;
+        return throwing(FQCN, level, t);
     }
 
     /**
@@ -1360,8 +1383,21 @@ public abstract class AbstractLogger imp
      * @return the Throwable.
      */
     public <T extends Throwable> T throwing(final T t) {
-        if (isEnabled(Level.ERROR, THROWING_MARKER, (Object) null, null)) {
-            log(THROWING_MARKER, FQCN, Level.ERROR, messageFactory.newMessage(THROWING), t);
+        return throwing(FQCN, Level.ERROR, t);
+    }
+
+    /**
+     * Logs a Throwable to be thrown with location information.
+     *
+     * @param fqcn The fully qualified class name of the <b>caller</b>.
+     * @param <T> the type of the Throwable.
+     * @param level The logging Level.
+     * @param t The Throwable.
+     * @return the Throwable.
+     */
+    protected <T extends Throwable> T throwing(String fqcn, final Level level, final T t) {
+        if (isEnabled(level, THROWING_MARKER, (Object) null, null)) {
+            log(THROWING_MARKER, fqcn, level, messageFactory.newMessage(THROWING), t);
         }
         return t;
     }

Modified: logging/log4j/log4j2/trunk/jcl-bridge/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/jcl-bridge/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/jcl-bridge/pom.xml (original)
+++ logging/log4j/log4j2/trunk/jcl-bridge/pom.xml Mon Apr  8 04:08:10 2013
@@ -39,7 +39,6 @@
      <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: logging/log4j/log4j2/trunk/log4j12-api/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/pom.xml (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/pom.xml Mon Apr  8 04:08:10 2013
@@ -37,7 +37,6 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: logging/log4j/log4j2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/pom.xml (original)
+++ logging/log4j/log4j2/trunk/pom.xml Mon Apr  8 04:08:10 2013
@@ -257,7 +257,7 @@
  	    <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
-        <version>2.4</version>
+        <version>2.5</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
@@ -567,6 +567,7 @@
     <module>jcl-bridge</module>
     <module>flume-ng</module>
     <module>web</module>
+    <module>taglib</module>
     <module>samples</module>
     <module>log4j-async</module>
   </modules>

Modified: logging/log4j/log4j2/trunk/samples/flume-common/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/pom.xml (original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/pom.xml Mon Apr  8 04:08:10 2013
@@ -64,7 +64,6 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: logging/log4j/log4j2/trunk/samples/flume-embedded/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-embedded/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-embedded/pom.xml (original)
+++ logging/log4j/log4j2/trunk/samples/flume-embedded/pom.xml Mon Apr  8 04:08:10 2013
@@ -123,7 +123,6 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: logging/log4j/log4j2/trunk/samples/flume-remote/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-remote/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-remote/pom.xml (original)
+++ logging/log4j/log4j2/trunk/samples/flume-remote/pom.xml Mon Apr  8 04:08:10 2013
@@ -76,7 +76,6 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.3.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: logging/log4j/log4j2/trunk/samples/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/pom.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/pom.xml (original)
+++ logging/log4j/log4j2/trunk/samples/pom.xml Mon Apr  8 04:08:10 2013
@@ -72,13 +72,13 @@
       <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
-        <version>2.4</version>
+        <version>2.5</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>3.8.1</version>
+        <version>4.7</version>
         <scope>test</scope>
       </dependency>
     </dependencies>

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Mon Apr  8 04:08:10 2013
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0-beta5" date="@TBD@" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-187" dev="rgoers" type="add" due-to="Nick Williams">
+        Add tag library.
+      </action>
       <action issue="LOG4J2-195" dev="rgoers" type="fix" due-to="Remko Popma">
         Unit tests now create files in the target directory.
       </action>

Modified: logging/log4j/log4j2/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/site.xml?rev=1465533&r1=1465532&r2=1465533&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/site.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/site.xml Mon Apr  8 04:08:10 2013
@@ -139,6 +139,7 @@
       <item name="Log4j 2 to SLF4J Adapter" href="log4j-to-slf4j/index.html"/>
       <item name="Apache Flume" href="log4j-flume-ng/index.html"/>
       <item name="Log4j Web" href="log4j-web/index.html"/>
+      <item name="Log4j Tag Library" href="log4j-taglib/index.html"/>
     </menu>
 
     <menu name="Project Information" img="icon-info-sign">

Propchange: logging/log4j/log4j2/trunk/taglib/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr  8 04:08:10 2013
@@ -0,0 +1,6 @@
+*.iml
+.idea
+target
+.settings
+.classpath
+.project

Added: logging/log4j/log4j2/trunk/taglib/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/pom.xml?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/pom.xml (added)
+++ logging/log4j/log4j2/trunk/taglib/pom.xml Mon Apr  8 04:08:10 2013
@@ -0,0 +1,201 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.logging.log4j</groupId>
+    <artifactId>log4j</artifactId>
+    <version>2.0-beta5-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent>
+  <groupId>org.apache.logging.log4j</groupId>
+  <artifactId>log4j-taglib</artifactId>
+  <packaging>jar</packaging>
+  <name>Apache Log4j Tag Library</name>
+  <description>Apache Log4j Tag Library for Web Applications</description>
+  <contributors>
+    <contributor>
+      <name>Nick Williams</name>
+      <email>nicholas@nicholaswilliams.net</email>
+    </contributor>
+  </contributors>
+  <properties>
+    <log4jParentDir>${basedir}/..</log4jParentDir>
+    <docLabel>Log4j Tag Library Documentation</docLabel>
+    <projectDir>/taglib</projectDir>
+  </properties>
+  <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>servlet-api</artifactId>
+      <version>2.5</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <version>2.1</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${changes.plugin.version}</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>changes-report</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+        <configuration>
+          <issueLinkTemplate>%URL%/show_bug.cgi?id=%ISSUE%</issueLinkTemplate>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>2.7</version>
+        <configuration>
+          <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> -->
+          <configLocation>${log4jParentDir}/checkstyle.xml</configLocation>
+          <suppressionsLocation>${log4jParentDir}/checkstyle-suppressions.xml</suppressionsLocation>
+          <enableRulesSummary>false</enableRulesSummary>
+          <propertyExpansion>basedir=${basedir}</propertyExpansion>
+          <propertyExpansion>licensedir=${log4jParentDir}/checkstyle-header.txt</propertyExpansion>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${javadoc.plugin.version}</version>
+        <configuration>
+          <bottom> <![CDATA[<p align="center">Copyright &#169; {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.<br />
+            Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo,
+            and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p>]]></bottom>
+          <!-- module link generation is completely broken in the javadoc plugin for a multi-module non-aggregating
+               project -->
+          <detectOfflineLinks>false</detectOfflineLinks>
+          <linksource>true</linksource>
+          <tags>
+            <tag>
+              <name>issue</name>
+              <placement>a</placement>
+              <head>JIRA issue:</head>
+            </tag>
+            <tag>
+              <name>doubt</name>
+              <placement>a</placement>
+              <head>Troublesome:</head>
+            </tag>
+            <tag>
+              <name>compare</name>
+              <placement>a</placement>
+              <head>Compare with:</head>
+            </tag>
+          </tags>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <id>non-aggregate</id>
+            <reports>
+              <report>javadoc</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <threshold>Normal</threshold>
+          <effort>Default</effort>
+          <excludeFilterFile>findbugs-exclude-filter.xml</excludeFilterFile>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.3</version>
+        <reportSets>
+          <reportSet>
+            <id>non-aggregate</id>
+            <reports>
+              <report>jxr</report>
+            </reports>
+          </reportSet>
+          <reportSet>
+            <id>aggregate</id>
+            <reports>
+              <report>aggregate</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>${pmd.plugin.version}</version>
+        <configuration>
+          <targetJdk>1.5</targetJdk>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+        <version>2.2</version>
+        <reportSets>
+          <reportSet>
+            <!-- Disabled at it kills the site generation via a NoClassDefFoundError -->
+            <reports />
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>net.sourceforge.maven-taglib</groupId>
+        <artifactId>maven-taglib-plugin</artifactId>
+        <version>2.4</version>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>
+

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/CatchingTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/CatchingTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/CatchingTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/CatchingTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+
+/**
+ * This class implements the {@code <log:catching>} tag.
+ *
+ * @since 2.0
+ */
+public class CatchingTag extends ExceptionAwareTagSupport {
+    private static final String FQCN = CatchingTag.class.getName();
+
+    private Level level;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.level = null;
+    }
+
+    public void setLevel(Object level) {
+        this.level = TagUtils.resolveLevel(level);
+    }
+
+    @Override
+    public int doEndTag() throws JspException {
+        Log4jTaglibLogger logger = this.getLogger();
+
+        if (this.level == null) {
+            logger.catching(FQCN, Level.ERROR, this.getException());
+        } else {
+            logger.catching(FQCN, this.level, this.getException());
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DebugTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DebugTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DebugTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DebugTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:debug>} tag.
+ *
+ * @since 2.0
+ */
+public class DebugTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.DEBUG;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DumpTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DumpTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DumpTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/DumpTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.jsp.tagext.TagSupport;
+import java.io.IOException;
+import java.util.Enumeration;
+
+/**
+ * This class implements the {@code <log:dump>} tag.
+ *
+ * @since 2.0
+ */
+public class DumpTag extends TagSupport {
+    private int scope;
+
+    public DumpTag() {
+        super();
+        init();
+    }
+
+    @Override
+    public void release() {
+        super.release();
+        this.init();
+    }
+
+    private void init() {
+        this.scope = PageContext.PAGE_SCOPE;
+    }
+
+    public void setScope(String scope) {
+        this.scope = TagUtils.getScope(scope);
+    }
+
+    @Override
+    public int doEndTag() throws JspException {
+        try {
+            Enumeration<String> names = this.pageContext.getAttributeNamesInScope(this.scope);
+            this.pageContext.getOut().write("<dl>");
+            while (names.hasMoreElements()) {
+                String name = names.nextElement();
+                Object value = this.pageContext.getAttribute(name, this.scope);
+
+                this.pageContext.getOut().write("<dt><code>" + name + "</code></dt>");
+                this.pageContext.getOut().write("<dd><code>" + value + "</code></dd>");
+            }
+            this.pageContext.getOut().write("</dl>");
+        } catch (IOException e) {
+            throw new JspException("Could not write scope contents. Cause:  " + e.toString(), e);
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/EntryTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/EntryTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/EntryTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/EntryTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.DynamicAttributes;
+import javax.servlet.jsp.tagext.Tag;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class implements the {@code <log:entry>} tag.
+ *
+ * @since 2.0
+ */
+public class EntryTag extends LoggerAwareTagSupport implements DynamicAttributes {
+    private static final String FQCN = EntryTag.class.getName();
+
+    private List<Object> attributes;
+
+    @Override
+    protected void init() {
+        super.init();
+        if (this.attributes == null) {
+            this.attributes = new ArrayList<Object>();
+        } else {
+            this.attributes.clear();
+        }
+    }
+
+    public void setDynamicAttribute(String uri, String name, Object value) {
+        this.attributes.add(value);
+    }
+
+    @Override
+    public int doEndTag() throws JspException {
+        Log4jTaglibLogger logger = this.getLogger();
+
+        if (TagUtils.isEnabled(logger, Level.TRACE, null)) {
+            if (this.attributes.size() == 0) {
+                logger.entry(FQCN);
+            } else {
+                logger.entry(FQCN, this.attributes.toArray());
+            }
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ErrorTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ErrorTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ErrorTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ErrorTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:error>} tag.
+ *
+ * @since 2.0
+ */
+public class ErrorTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.ERROR;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExceptionAwareTagSupport.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExceptionAwareTagSupport.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExceptionAwareTagSupport.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExceptionAwareTagSupport.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+/**
+ * Implements common methods for all logging tags that accept exceptions.
+ *
+ * @since 2.0
+ */
+abstract class ExceptionAwareTagSupport extends LoggerAwareTagSupport {
+    private Throwable exception;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.exception = null;
+    }
+
+    protected final Throwable getException() {
+        return this.exception;
+    }
+
+    public final void setException(Throwable exception) {
+        this.exception = exception;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExitTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExitTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExitTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/ExitTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+
+/**
+ * This class implements the {@code <log:exit>} tag.
+ *
+ * @since 2.0
+ */
+public class ExitTag extends LoggerAwareTagSupport {
+    private static final String FQCN = ExitTag.class.getName();
+
+    private Object result;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.result = null;
+    }
+
+    public void setResult(Object result) {
+        this.result = result;
+    }
+
+    @Override
+    public int doEndTag() throws JspException {
+        Log4jTaglibLogger logger = this.getLogger();
+
+        if (TagUtils.isEnabled(logger, Level.TRACE, null)) {
+            if (this.result == null) {
+                logger.exit(FQCN, null);
+            } else {
+                logger.exit(FQCN, this.result);
+            }
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/FatalTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/FatalTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/FatalTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/FatalTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:fatal>} tag.
+ *
+ * @since 2.0
+ */
+public class FatalTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.FATAL;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/IfEnabledTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/IfEnabledTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/IfEnabledTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/IfEnabledTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.Marker;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+
+/**
+ * This class implements the {@code <log:ifEnabled>} tag.
+ *
+ * @since 2.0
+ */
+public class IfEnabledTag extends LoggerAwareTagSupport {
+    private Object level;
+
+    private Marker marker;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.level = null;
+        this.marker = null;
+    }
+
+    public final void setLevel(Object level) {
+        this.level = level;
+    }
+
+    public final void setMarker(Marker marker) {
+        this.marker = marker;
+    }
+
+    @Override
+    public int doStartTag() throws JspException {
+        Level level = TagUtils.resolveLevel(this.level);
+        if (level == null) {
+            throw new JspException("Level must be of type String or org.apache.logging.log4j.Level.");
+        }
+
+        return TagUtils.isEnabled(this.getLogger(), level, this.marker) ? Tag.EVAL_BODY_INCLUDE : Tag.SKIP_BODY;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:info>} tag.
+ *
+ * @since 2.0
+ */
+public class InfoTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.INFO;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.message.MessageFactory;
+import org.apache.logging.log4j.spi.AbstractLogger;
+import org.apache.logging.log4j.spi.AbstractLoggerWrapper;
+
+/**
+ * The bridge between the tag library and the Log4j API ensures that the source information for log events is
+ * the JSP Servlet and not one of the taglib classes.
+ *
+ * @since 2.0
+ */
+class Log4jTaglibLogger extends AbstractLoggerWrapper {
+    public Log4jTaglibLogger(AbstractLogger logger, String name, MessageFactory messageFactory) {
+        super(logger, name, messageFactory);
+    }
+
+    @Override
+    protected void entry(String fqcn, Object... params) {
+        super.entry(fqcn, params);
+    }
+
+    @Override
+    protected <R> R exit(String fqcn, R result) {
+        return super.exit(fqcn, result);
+    }
+
+    @Override
+    protected void catching(String fqcn, Level level, Throwable t) {
+        super.catching(fqcn, level, t);
+    }
+
+    @Override
+    protected <T extends Throwable> T throwing(String fqcn, Level level, T t) {
+        return super.throwing(fqcn, level, t);
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLoggerContext.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLoggerContext.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLoggerContext.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LoggingException;
+import org.apache.logging.log4j.message.MessageFactory;
+import org.apache.logging.log4j.spi.AbstractLogger;
+import org.apache.logging.log4j.spi.LoggerContext;
+
+import javax.servlet.ServletContext;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * This bridge between the tag library and the Log4j API ensures that instances of {@link Log4jTaglibLogger} are
+ * appropriately held in memory and not constantly recreated.
+ *
+ * @since 2.0
+ */
+final class Log4jTaglibLoggerContext implements LoggerContext {
+    private static final ConcurrentMap<ServletContext, Log4jTaglibLoggerContext> CONTEXTS =
+            new ConcurrentHashMap<ServletContext, Log4jTaglibLoggerContext>();
+
+    private final ConcurrentMap<String, Log4jTaglibLogger> loggers =
+            new ConcurrentHashMap<String, Log4jTaglibLogger>();
+
+    private final ServletContext servletContext;
+
+    private Log4jTaglibLoggerContext(ServletContext servletContext) {
+        this.servletContext = servletContext;
+    }
+
+    public Object getExternalContext() {
+        return this.servletContext;
+    }
+
+    public Log4jTaglibLogger getLogger(String name) {
+        return this.getLogger(name, null);
+    }
+
+    public Log4jTaglibLogger getLogger(String name, MessageFactory factory) {
+        Log4jTaglibLogger logger = this.loggers.get(name);
+        if (logger != null) {
+            AbstractLogger.checkMessageFactory(logger, factory);
+            return logger;
+        }
+
+        // wrap a logger from an underlying implementation
+        Logger original = factory == null ? LogManager.getLogger(name) : LogManager.getLogger(name, factory);
+        if (original instanceof AbstractLogger) {
+            logger = new Log4jTaglibLogger((AbstractLogger) original, name, original.getMessageFactory());
+            Log4jTaglibLogger existing = this.loggers.putIfAbsent(name, logger);
+            return existing == null ? logger : existing;
+        }
+
+        throw new LoggingException("Log4j Tag Library requires base logging system to extend Log4j AbstractLogger.");
+    }
+
+    public boolean hasLogger(String name) {
+        return this.loggers.containsKey(name);
+    }
+
+    static synchronized Log4jTaglibLoggerContext getInstance(ServletContext servletContext) {
+        if (CONTEXTS.containsKey(servletContext)) {
+            return CONTEXTS.get(servletContext);
+        }
+
+        Log4jTaglibLoggerContext context = new Log4jTaglibLoggerContext(servletContext);
+        Log4jTaglibLoggerContext existing = CONTEXTS.putIfAbsent(servletContext, context);
+        return existing == null ? context : existing;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LogTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LogTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LogTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LogTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:log>} tag.
+ *
+ * @since 2.0
+ */
+public class LogTag extends LoggingMessageTagSupport {
+    private Level level;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.level = null;
+    }
+
+    @Override
+    protected Level getLevel() {
+        return this.level;
+    }
+
+    public void setLevel(Object level) {
+        this.level = TagUtils.resolveLevel(level);
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+
+/**
+ * An abstract class for all tags that are logger-aware.
+ *
+ * @since 2.0
+ */
+abstract class LoggerAwareTagSupport extends BodyTagSupport {
+    private Log4jTaglibLoggerContext loggerContext;
+    private Object logger;
+
+    protected LoggerAwareTagSupport() {
+        this.init();
+    }
+
+    protected void init() {
+        this.logger = null;
+    }
+
+    @Override
+    public final void release() {
+        super.release();
+        this.init();
+    }
+
+    @Override
+    public void setPageContext(PageContext pageContext) {
+        super.setPageContext(pageContext);
+        this.loggerContext = Log4jTaglibLoggerContext.getInstance(pageContext.getServletContext());
+    }
+
+    protected final Log4jTaglibLogger getLogger() throws JspException {
+        if (this.logger != null) {
+            return TagUtils.resolveLogger(this.loggerContext, this.logger, null);
+        } else {
+            Log4jTaglibLogger logger = TagUtils.getDefaultLogger(this.pageContext);
+            if (logger == null) {
+                String name = this.pageContext.getPage().getClass().getName();
+                logger = TagUtils.resolveLogger(this.loggerContext, name, null);
+                TagUtils.setDefaultLogger(this.pageContext, logger);
+            }
+            return logger;
+        }
+    }
+
+    public final void setLogger(Object logger) {
+        this.logger = logger;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupport.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupport.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupport.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupport.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.Marker;
+import org.apache.logging.log4j.message.Message;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.BodyTag;
+import javax.servlet.jsp.tagext.DynamicAttributes;
+import javax.servlet.jsp.tagext.Tag;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Implements common methods for logging tags that accept messages and markers.
+ *
+ * @since 2.0
+ */
+abstract class LoggingMessageTagSupport extends ExceptionAwareTagSupport implements DynamicAttributes {
+    private static final String FQCN = LoggingMessageTagSupport.class.getName();
+
+    private Object message;
+
+    private Marker marker;
+
+    private List<Object> attributes;
+
+    @Override
+    protected void init() {
+        super.init();
+        this.message = null;
+        this.marker = null;
+        if (this.attributes == null) {
+            this.attributes = new ArrayList<Object>();
+        } else {
+            this.attributes.clear();
+        }
+    }
+
+    protected final Object getMessage() throws JspException {
+        if (this.message == null) {
+            if (this.getBodyContent() == null) {
+                throw new JspException("Either message attribute or body content must be specified.");
+            }
+            return this.getBodyContent().getString();
+        }
+        return this.message;
+    }
+
+    public final void setMessage(Object message) {
+        this.message = message;
+    }
+
+    protected final Marker getMarker() {
+        return this.marker;
+    }
+
+    public final void setMarker(Marker marker) {
+        this.marker = marker;
+    }
+
+    protected abstract Level getLevel();
+
+    public final void setDynamicAttribute(String uri, String name, Object value) {
+        this.attributes.add(value);
+    }
+
+    @Override
+    public final int doStartTag() {
+        return BodyTag.EVAL_BODY_BUFFERED;
+    }
+
+    @Override
+    public final int doEndTag() throws JspException {
+        Log4jTaglibLogger logger = this.getLogger();
+        Level level = this.getLevel();
+        Marker marker = this.getMarker();
+
+        if (TagUtils.isEnabled(logger, level, marker)) {
+            Object message = this.getMessage();
+            Throwable exception = this.getException();
+            if (message instanceof Message) {
+                logger.log(marker, FQCN, level, (Message) message, exception);
+            } else if (message instanceof String) {
+                Message data;
+                if (this.attributes.size() > 0) {
+                    data = logger.getMessageFactory().newMessage((String) message, this.attributes.toArray());
+                } else {
+                    data = logger.getMessageFactory().newMessage((String) message);
+                }
+                logger.log(marker, FQCN, level, data, exception);
+            } else {
+                logger.log(marker, FQCN, level, logger.getMessageFactory().newMessage(message), exception);
+            }
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/SetLoggerTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/SetLoggerTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/SetLoggerTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/SetLoggerTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.message.MessageFactory;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import javax.servlet.jsp.tagext.Tag;
+
+/**
+ * This class implements the {@code <log:setLogger>} tag.
+ *
+ * @since 2.0
+ */
+public class SetLoggerTag extends BodyTagSupport {
+    private Log4jTaglibLoggerContext loggerContext;
+
+    private Object logger;
+
+    private MessageFactory factory;
+
+    private String var;
+
+    private int scope;
+
+    public SetLoggerTag() {
+        super();
+        init();
+    }
+
+    private void init() {
+        this.logger = null;
+        this.var = null;
+        this.scope = PageContext.PAGE_SCOPE;
+    }
+
+    @Override
+    public void release() {
+        super.release();
+        this.init();
+    }
+
+    @Override
+    public void setPageContext(PageContext pageContext) {
+        super.setPageContext(pageContext);
+        this.loggerContext = Log4jTaglibLoggerContext.getInstance(pageContext.getServletContext());
+    }
+
+    public void setLogger(Object logger) {
+        this.logger = logger;
+    }
+
+    public void setFactory(MessageFactory factory) {
+        this.factory = factory;
+    }
+
+    public void setVar(String var) {
+        this.var = var;
+    }
+
+    public void setScope(String scope) {
+        this.scope = TagUtils.getScope(scope);
+    }
+
+    @Override
+    public int doEndTag() throws JspException {
+        Log4jTaglibLogger logger = TagUtils.resolveLogger(this.loggerContext, this.logger, this.factory);
+
+        if (this.var != null) {
+            this.pageContext.setAttribute(this.var, logger, this.scope);
+        } else {
+            TagUtils.setDefaultLogger(this.pageContext, logger);
+        }
+
+        return Tag.EVAL_PAGE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TagUtils.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TagUtils.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TagUtils.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TagUtils.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LoggingException;
+import org.apache.logging.log4j.Marker;
+import org.apache.logging.log4j.message.MessageFactory;
+import org.apache.logging.log4j.spi.AbstractLogger;
+import org.apache.logging.log4j.status.StatusLogger;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Provides support for logging tags.
+ *
+ * @since 2.0
+ */
+final class TagUtils {
+    private static final StatusLogger log = StatusLogger.getLogger();
+
+    private static final Set<Object> WARNED_FOR = new HashSet<Object>();
+
+    private static final String LOGGER_SCOPE_ATTRIBUTE = "org.apache.logging.log4j.taglib.LOGGER_SCOPE_ATTRIBUTE";
+
+    private TagUtils() {
+        throw new RuntimeException("TagUtils cannot be instantiated.");
+    }
+
+    static int getScope(String scope) {
+        if ("request".equalsIgnoreCase(scope)) {
+            return PageContext.REQUEST_SCOPE;
+        }
+        if ("session".equalsIgnoreCase(scope)) {
+            return PageContext.SESSION_SCOPE;
+        }
+        if ("application".equalsIgnoreCase(scope)) {
+            return PageContext.APPLICATION_SCOPE;
+        }
+        return PageContext.PAGE_SCOPE;
+    }
+
+    static Level resolveLevel(Object level) {
+        if (level instanceof Level) {
+            return (Level) level;
+        }
+        if (level instanceof String) {
+            return Level.toLevel((String) level);
+        }
+        return null;
+    }
+
+    static Log4jTaglibLogger resolveLogger(final Log4jTaglibLoggerContext context, final Object logger,
+                                           final MessageFactory factory) throws JspException {
+        if (logger instanceof Logger) {
+            if (logger instanceof Log4jTaglibLogger) {
+                return (Log4jTaglibLogger) logger;
+            }
+            if (logger instanceof AbstractLogger) {
+                if (log.isInfoEnabled() && !WARNED_FOR.contains(logger)) {
+                    log.info("Constructing new Log4jTaglibLogger from AbstractLogger {} name and message factory.",
+                            logger.getClass().getName());
+                    WARNED_FOR.add(logger);
+                }
+                AbstractLogger original = (AbstractLogger) logger;
+                return getLogger(context, original.getName(), original.getMessageFactory());
+            }
+            throw new JspException(
+                    "Log4j Tag Library requires base logging system to extend Log4j AbstractLogger.");
+        }
+        if (logger instanceof String) {
+            return getLogger(context, (String) logger, factory);
+        }
+        throw new JspException("Logger must be of type String or org.apache.logging.log4j.Logger.");
+    }
+
+    private static Log4jTaglibLogger getLogger(Log4jTaglibLoggerContext context, String name, MessageFactory factory)
+            throws JspException {
+        try {
+            return context.getLogger(name, factory);
+        } catch (LoggingException e) {
+            throw new JspException(e.getMessage(), e);
+        }
+    }
+
+    static void setDefaultLogger(PageContext pageContext, Log4jTaglibLogger logger) {
+        pageContext.setAttribute(TagUtils.LOGGER_SCOPE_ATTRIBUTE, logger, PageContext.PAGE_SCOPE);
+    }
+
+    static Log4jTaglibLogger getDefaultLogger(PageContext pageContext) {
+        return (Log4jTaglibLogger) pageContext.getAttribute(TagUtils.LOGGER_SCOPE_ATTRIBUTE, PageContext.PAGE_SCOPE);
+    }
+
+    static boolean isEnabled(Log4jTaglibLogger logger, Level level, Marker marker) {
+        if (marker == null) {
+            return logger.isEnabled(level);
+        }
+        return logger.isEnabled(level, marker, (Object) null, null);
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TraceTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TraceTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TraceTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/TraceTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:trace>} tag.
+ *
+ * @since 2.0
+ */
+public class TraceTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.TRACE;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.taglib;
+
+import org.apache.logging.log4j.Level;
+
+/**
+ * This class implements the {@code <log:warn>} tag.
+ *
+ * @since 2.0
+ */
+public class WarnTag extends LoggingMessageTagSupport {
+    @Override
+    protected Level getLevel() {
+        return Level.WARN;
+    }
+}

Added: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/package-info.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/package-info.java?rev=1465533&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/package-info.java (added)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/package-info.java Mon Apr  8 04:08:10 2013
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/**
+ +  Classes (JSP tags) to enable logging in JSPs without using Java scripting.
+ +
+ +  @since 2.0
+ */
+package org.apache.logging.log4j.taglib;
\ No newline at end of file



Mime
View raw message