You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2012/12/12 18:04:52 UTC

svn commit: r1420834 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/ api/src/main/java/org/apache/logging/log4j/message/ api/src/test/java/org/apache/logging/log4j/ core/src/test/java/org/apache/logging/log4j/ core/src/tes...

Author: ggregory
Date: Wed Dec 12 17:04:45 2012
New Revision: 1420834

URL: http://svn.apache.org/viewvc?rev=1420834&view=rev
Log:
Document the new formatter logger and add LogManager.getFormatterLogger() as a short-hand to the full getLogger with MessageFormat APIs.

Added:
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java   (with props)
Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java Wed Dec 12 17:04:45 2012
@@ -19,12 +19,14 @@ package org.apache.logging.log4j;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Enumeration;
+import java.util.Formatter;
 import java.util.Map;
 import java.util.Properties;
 import java.util.SortedMap;
 import java.util.TreeMap;
 
 import org.apache.logging.log4j.message.MessageFactory;
+import org.apache.logging.log4j.message.StringFormatterMessageFactory;
 import org.apache.logging.log4j.simple.SimpleLoggerContextFactory;
 import org.apache.logging.log4j.spi.LoggerContext;
 import org.apache.logging.log4j.spi.LoggerContextFactory;
@@ -238,6 +240,96 @@ public class LogManager {
     }
 
     /**
+     * Returns a formatter Logger using the fully qualified name of the Class as the Logger name.
+     * <p>
+     * This logger let you use a {@link Formatter} string in the message to format parameters.
+     * </p>
+     * <p>
+     * Short-hand for {@code getLogger(clazz, StringFormatterMessageFactory.INSTANCE)}
+     * </p>
+     * 
+     * @param clazz
+     *            The Class whose name should be used as the Logger name.
+     * @return The Logger, created with a {@link StringFormatterMessageFactory}
+     * @see Logger#fatal(Marker, String, Object...)
+     * @see Logger#fatal(String, Object...)
+     * @see Logger#error(Marker, String, Object...)
+     * @see Logger#error(String, Object...)
+     * @see Logger#warn(Marker, String, Object...)
+     * @see Logger#warn(String, Object...)
+     * @see Logger#info(Marker, String, Object...)
+     * @see Logger#info(String, Object...)
+     * @see Logger#debug(Marker, String, Object...)
+     * @see Logger#debug(String, Object...)
+     * @see Logger#trace(Marker, String, Object...)
+     * @see Logger#trace(String, Object...)
+     * @see StringFormatterMessageFactory
+     */
+    public static Logger getFormatterLogger(final Class<?> clazz) {
+        return getLogger(clazz, StringFormatterMessageFactory.INSTANCE);
+    }
+
+    /**
+     * Returns a formatter Logger using the fully qualified name of the value's Class as the Logger name.
+     * <p>
+     * This logger let you use a {@link Formatter} string in the message to format parameters.
+     * </p>
+     * <p>
+     * Short-hand for {@code getLogger(value, StringFormatterMessageFactory.INSTANCE)}
+     * </p>
+     * 
+     * @param value
+     *            The value's whose class name should be used as the Logger name.
+     * @return The Logger, created with a {@link StringFormatterMessageFactory}
+     * @see Logger#fatal(Marker, String, Object...)
+     * @see Logger#fatal(String, Object...)
+     * @see Logger#error(Marker, String, Object...)
+     * @see Logger#error(String, Object...)
+     * @see Logger#warn(Marker, String, Object...)
+     * @see Logger#warn(String, Object...)
+     * @see Logger#info(Marker, String, Object...)
+     * @see Logger#info(String, Object...)
+     * @see Logger#debug(Marker, String, Object...)
+     * @see Logger#debug(String, Object...)
+     * @see Logger#trace(Marker, String, Object...)
+     * @see Logger#trace(String, Object...)
+     * @see StringFormatterMessageFactory
+     */
+    public static Logger getFormatterLogger(final Object value) {
+        return getLogger(value, StringFormatterMessageFactory.INSTANCE);
+    }
+
+    /**
+     * Returns a formatter Logger with the specified name.
+     * <p>
+     * This logger let you use a {@link Formatter} string in the message to format parameters.
+     * </p>
+     * <p>
+     * Short-hand for {@code getLogger(name, StringFormatterMessageFactory.INSTANCE)}
+     * </p>
+     * 
+     * @param name
+     *            The logger name.
+     * @return The Logger, created with a {@link StringFormatterMessageFactory}
+     * @see Logger#fatal(Marker, String, Object...)
+     * @see Logger#fatal(String, Object...)
+     * @see Logger#error(Marker, String, Object...)
+     * @see Logger#error(String, Object...)
+     * @see Logger#warn(Marker, String, Object...)
+     * @see Logger#warn(String, Object...)
+     * @see Logger#info(Marker, String, Object...)
+     * @see Logger#info(String, Object...)
+     * @see Logger#debug(Marker, String, Object...)
+     * @see Logger#debug(String, Object...)
+     * @see Logger#trace(Marker, String, Object...)
+     * @see Logger#trace(String, Object...)
+     * @see StringFormatterMessageFactory
+     */
+    public static Logger getFormatterLogger(final String name) {
+        return getLogger(name, StringFormatterMessageFactory.INSTANCE);
+    }
+
+    /**
      * Returns a Logger using the fully qualified name of the Class as the Logger name.
      * @param clazz The Class whose name should be used as the Logger name.
      * @return The Logger.
@@ -285,7 +377,6 @@ public class LogManager {
         return factory.getContext(LogManager.class.getName(), null, false).getLogger(name);
     }
 
-
     /**
      * Returns a Logger with the specified name.
      *

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java Wed Dec 12 17:04:45 2012
@@ -27,7 +27,7 @@ package org.apache.logging.log4j.message
  * 
  * @version $Id$
  */
-public class ParameterizedMessageFactory extends AbstractMessageFactory {
+public final class ParameterizedMessageFactory extends AbstractMessageFactory {
 
     /**
      * Instance of StringFormatterMessageFactory.

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java Wed Dec 12 17:04:45 2012
@@ -29,7 +29,7 @@ import java.util.Formatter;
  * 
  * @version $Id$
  */
-public class StringFormatterMessageFactory extends AbstractMessageFactory {
+public final class StringFormatterMessageFactory extends AbstractMessageFactory {
 
     /**
      * Instance of StringFormatterMessageFactory.

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java Wed Dec 12 17:04:45 2012
@@ -136,11 +136,23 @@ public class LoggerTest {
     public void getLogger_Class_StringFormatterMessageFactory() {
         // The TestLogger logger was already created in an instance variable for this class.
         // The message factory is only used when the logger is created.
-        final StringFormatterMessageFactory messageFactory = new StringFormatterMessageFactory();
         final TestLogger testLogger = (TestLogger) LogManager.getLogger(TestStringFormatterMessageFactory.class,
-                messageFactory);
+                StringFormatterMessageFactory.INSTANCE);
         assertNotNull(testLogger);
-        assertEquals(messageFactory, testLogger.getMessageFactory());
+        assertEquals(StringFormatterMessageFactory.INSTANCE, testLogger.getMessageFactory());
+        testLogger.debug("%,d", Integer.MAX_VALUE);
+        assertEquals(1, testLogger.getEntries().size());
+        assertEquals(String.format(" DEBUG %,d", Integer.MAX_VALUE), testLogger.getEntries().get(0));
+    }
+
+    @Test
+    public void getFormatterLogger_Class() {
+        // The TestLogger logger was already created in an instance variable for this class.
+        // The message factory is only used when the logger is created.
+        final TestLogger testLogger = (TestLogger) LogManager.getFormatterLogger(TestStringFormatterMessageFactory.class);
+        assertNotNull(testLogger);
+        assertTrue(testLogger.getMessageFactory() instanceof StringFormatterMessageFactory);
+        assertEquals(StringFormatterMessageFactory.INSTANCE, testLogger.getMessageFactory());
         testLogger.debug("%,d", Integer.MAX_VALUE);
         assertEquals(1, testLogger.getEntries().size());
         assertEquals(String.format(" DEBUG %,d", Integer.MAX_VALUE), testLogger.getEntries().get(0));
@@ -150,7 +162,7 @@ public class LoggerTest {
     public void getLogger_Object_StringFormatterMessageFactory() {
         // The TestLogger logger was already created in an instance variable for this class.
         // The message factory is only used when the logger is created.
-        final StringFormatterMessageFactory messageFactory = new StringFormatterMessageFactory();
+        final StringFormatterMessageFactory messageFactory = StringFormatterMessageFactory.INSTANCE;
         final TestLogger testLogger = (TestLogger) LogManager.getLogger(new TestStringFormatterMessageFactory(),
                 messageFactory);
         assertNotNull(testLogger);
@@ -161,6 +173,19 @@ public class LoggerTest {
     }
 
     @Test
+    public void getFormatterLogger_Object() {
+        // The TestLogger logger was already created in an instance variable for this class.
+        // The message factory is only used when the logger is created.
+        final TestLogger testLogger = (TestLogger) LogManager.getFormatterLogger(new TestStringFormatterMessageFactory());
+        assertNotNull(testLogger);
+        assertTrue(testLogger.getMessageFactory() instanceof StringFormatterMessageFactory);
+        assertEquals(StringFormatterMessageFactory.INSTANCE, testLogger.getMessageFactory());
+        testLogger.debug("%,d", Integer.MAX_VALUE);
+        assertEquals(1, testLogger.getEntries().size());
+        assertEquals(String.format(" DEBUG %,d", Integer.MAX_VALUE), testLogger.getEntries().get(0));
+    }
+
+    @Test
     public void getLogger_String_ParameterizedMessageFactory() {
         final ParameterizedMessageFactory messageFactory =  ParameterizedMessageFactory.INSTANCE;
         final TestLogger testLogger = (TestLogger) LogManager.getLogger("getLogger_String_ParameterizedMessageFactory",
@@ -174,7 +199,7 @@ public class LoggerTest {
 
     @Test
     public void getLogger_String_StringFormatterMessageFactory() {
-        final StringFormatterMessageFactory messageFactory = new StringFormatterMessageFactory();
+        final StringFormatterMessageFactory messageFactory = StringFormatterMessageFactory.INSTANCE;
         final TestLogger testLogger = (TestLogger) LogManager.getLogger("getLogger_String_StringFormatterMessageFactory",
                 messageFactory);
         assertNotNull(testLogger);
@@ -185,8 +210,20 @@ public class LoggerTest {
     }
 
     @Test
+    public void getFormatterLogger_String() {
+        final StringFormatterMessageFactory messageFactory = StringFormatterMessageFactory.INSTANCE;
+        final TestLogger testLogger = (TestLogger) LogManager.getFormatterLogger("getLogger_String_StringFormatterMessageFactory");
+        assertNotNull(testLogger);
+        assertTrue(testLogger.getMessageFactory() instanceof StringFormatterMessageFactory);
+        assertEquals(messageFactory, testLogger.getMessageFactory());
+        testLogger.debug("%,d", Integer.MAX_VALUE);
+        assertEquals(1, testLogger.getEntries().size());
+        assertEquals(String.format(" DEBUG %,d", Integer.MAX_VALUE), testLogger.getEntries().get(0));
+    }
+
+    @Test
     public void getLogger_String_MessageFactoryMismatch() {
-        final StringFormatterMessageFactory messageFactory = new StringFormatterMessageFactory();
+        final StringFormatterMessageFactory messageFactory = StringFormatterMessageFactory.INSTANCE;
         final TestLogger testLogger = (TestLogger) LogManager.getLogger("getLogger_String_MessageFactoryMismatch",
                 messageFactory);
         assertNotNull(testLogger);

Added: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java?rev=1420834&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java (added)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java Wed Dec 12 17:04:45 2012
@@ -0,0 +1,41 @@
+package org.apache.logging.log4j;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configurator;
+
+public class FormatterLoggerManualExample {
+
+    private static class User {
+        Calendar getBirthdayCalendar() {
+            return new GregorianCalendar(1995, Calendar.MAY, 23);
+        }
+
+        String getName() {
+            return "John Smith";
+        }
+    }
+
+    public static Logger logger = LogManager.getFormatterLogger("Foo");
+
+    /**
+     * @param args
+     */
+    public static void main(final String[] args) {
+        final LoggerContext ctx = Configurator.initialize(FormatterLoggerManualExample.class.getName(), null,
+                "target/test-classes/log4j2-console.xml");
+        try {
+            final User user = new User();
+            logger.debug("User %s with birthday %s", user.getName(), user.getBirthdayCalendar());
+            logger.debug("User %1$s with birthday %2$tm %2$te, %2$tY", user.getName(), user.getBirthdayCalendar());
+            logger.debug("Integer.MAX_VALUE = %,d", Integer.MAX_VALUE);
+            logger.debug("Long.MAX_VALUE = %,d", Long.MAX_VALUE);
+        } finally {
+            Configurator.shutdown(ctx);
+        }
+
+    }
+
+}

Propchange: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java Wed Dec 12 17:04:45 2012
@@ -130,7 +130,7 @@ public class LoggerTest {
     @Test
     public void getLogger_String_MessageFactoryMismatch() {
         final Logger testLogger = testMessageFactoryMismatch("getLogger_String_MessageFactoryMismatch",
-                new StringFormatterMessageFactory(), ParameterizedMessageFactory.INSTANCE);
+                StringFormatterMessageFactory.INSTANCE, ParameterizedMessageFactory.INSTANCE);
         testLogger.debug("%,d", Integer.MAX_VALUE);
         final List<LogEvent> events = app.getEvents();
         assertTrue("Incorrect number of events. Expected 1, actual " + events.size(), events.size() == 1);
@@ -139,7 +139,7 @@ public class LoggerTest {
 
     @Test
     public void getLogger_String_MessageFactoryMismatchNull() {
-        final Logger testLogger =  testMessageFactoryMismatch("getLogger_String_MessageFactoryMismatchNull", new StringFormatterMessageFactory(), null);
+        final Logger testLogger =  testMessageFactoryMismatch("getLogger_String_MessageFactoryMismatchNull", StringFormatterMessageFactory.INSTANCE, null);
         testLogger.debug("%,d", Integer.MAX_VALUE);
         final List<LogEvent> events = app.getEvents();
         assertTrue("Incorrect number of events. Expected 1, actual " + events.size(), events.size() == 1);        

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/api.xml Wed Dec 12 17:04:45 2012
@@ -20,6 +20,7 @@
     <properties>
         <title>Log4j 2 API</title>
         <author email="rgoers@apache.org">Ralph Goers</author>
+        <author email="ggregory@apache.org">Gary Gregory</author>
     </properties>
 
     <body>
@@ -36,9 +37,10 @@
             <h4>Hello World!</h4>
             <p>
               No introduction would be complete without the customary Hello, World example. Here is ours. First,
-              a Logger with the name "HelloWorld" is obtained from the LogManager. Next, the logger is used to
-              write the "Hello, World!" message, however the message will be written only if the Logger is
-              configured to allow informational messages.
+              a Logger with the name "HelloWorld" is obtained from the 
+              <a href="../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html">LogManager</a>. 
+              Next, the logger is used to write the "Hello, World!" message, however the message will be written 
+              only if the Logger is configured to allow informational messages.
             </p>
             <pre class="prettyprint linenums">import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -53,25 +55,49 @@ public class HelloWorld {
               The output from the call to logger.info() will vary significantly depending on the configuration
               used. See the <a href="./configuration.html">Configuration</a> section for more details.
             </p>
-            <h4>Parameter Substitution</h4>
+            <h4>Substituting Parameters</h4>
             <p>
               Frequently the purpose of logging is to provide information about what is happening in the system,
               which requires including information about the objects being manipulated. In Log4j 1.x this could
               be accomplished by doing:
             </p>
             <pre class="prettyprint linenums">if (logger.isDebugEnabled()) {
-    logger.debug("Logging in user " + user.getName() + " with id " + user.getId());
+    logger.debug("Logging in user " + user.getName() + " with birthday " + user.getBirthdayCalendar());
 }</pre>
             <p>
               Doing this repeatedly has the effect of making the code feel like it is more about logging than the
               actual task at hand. In addition, it results in the logging level being checked twice; once on the
               call to isDebugEnabled and once on the debug method. A better alternative would be:
             </p>
-            <pre class="prettyprint">logger.debug("Logging in user {} with id {}", user.getName(), user.getId());</pre>
+            <pre class="prettyprint">logger.debug("Logging in user {} with birthday {}", user.getName(), user.getBirthdayCalendar());</pre>
             <p>
               With the code above the logging level will only be checked once and the String construction will
               only occur when debug logging is enabled.
             </p>
+            <h4>Formatting Parameters</h4>
+            <p>
+              Substituting parameters leaves formatting up to you if <code>toString()</code> is not what you want.
+              To facilitate formatting, you can use the same format strings as Java's 
+              <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax">Formatter</a>.              
+              For example:
+            </p>
+            <pre class="prettyprint linenums">public static Logger logger = LogManager.getFormatterLogger("Foo");
+            
+logger.debug("Logging in user %s with birthday %s", user.getName(), user.getBirthdayCalendar());
+logger.debug("Logging in user %1$s with birthday %2$tm %2$te,%2$tY", user.getName(), user.getBirthdayCalendar());
+logger.debug("Integer.MAX_VALUE = %,d", Integer.MAX_VALUE);
+logger.debug("Long.MAX_VALUE = %,d", Long.MAX_VALUE);
+</pre>
+            <p>
+              To use a formatter Logger, you must call one of the LogManager
+              <a href="../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html#getFormatterLogger(java.lang.Class)">getFormatterLogger</a>
+              method. The output for this example shows that Calendar toString() is verbose compared to custom formatting:
+            </p>
+            <pre class="prettyprint linenums">2012-12-12 11:56:19,633 [main] DEBUG: User John Smith with birthday java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1995,MONTH=4,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=23,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]
+2012-12-12 11:56:19,643 [main] DEBUG: User John Smith with birthday 05 23, 1995
+2012-12-12 11:56:19,643 [main] DEBUG: Integer.MAX_VALUE = 2,147,483,647
+2012-12-12 11:56:19,643 [main] DEBUG: Long.MAX_VALUE = 9,223,372,036,854,775,807
+</pre>
           </subsection>
         </section>
     </body>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml?rev=1420834&r1=1420833&r2=1420834&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/thread-context.xml Wed Dec 12 17:04:45 2012
@@ -20,6 +20,7 @@
     <properties>
         <title>Log4j 2 Thread Context</title>
         <author email="rgoers@apache.org">Ralph Goers</author>
+        <author email="ggregory@apache.org">Gary Gregory</author>
     </properties>
 
     <body>