You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2007/04/25 18:57:06 UTC

svn commit: r532408 [1/2] - in /logging/sandbox/log4j/pattern-layout: ./ src/changes/ src/main/java/org/apache/log4j/ src/main/java/org/apache/log4j/helpers/ src/main/java/org/apache/log4j/pattern/ src/test/java/org/apache/log4j/ src/test/java/org/apac...

Author: carnold
Date: Wed Apr 25 09:57:03 2007
New Revision: 532408

URL: http://svn.apache.org/viewvc?view=rev&rev=532408
Log:
Bug 42121: Renamed to EnhancedPatternLayout, should be usable now with stock log4j 1.2's

Added:
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java   (contents, props changed)
      - copied, changed from r532381, logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/PatternLayout.java
Removed:
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/PatternLayout.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/helpers/
Modified:
    logging/sandbox/log4j/pattern-layout/build.xml
    logging/sandbox/log4j/pattern-layout/src/changes/changes.xml
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternParser.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/CachedDateFormat.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ClassNamePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/DatePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileDatePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileLocationPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FormattingInfo.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FullLocationPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/IntegerPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LevelPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineLocationPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineSeparatorPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LiteralPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggerPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggingEventPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MessagePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MethodLocationPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NDCPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NameAbbreviator.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NamePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternParser.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PropertiesPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/RelativeTimePatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/SequenceNumberPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThreadPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternLayout.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternParser.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTest.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTestCase.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/CachedDateFormatTest.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/FormattingInfoTest.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/NameAbbreviatorTest.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java
    logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/PatternParserTest.java
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout.mdc.1.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout1.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout10.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout11.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout12.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout13.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout14.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout15.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout16.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout2.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout3.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout4.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout5.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout6.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout7.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout8.properties
    logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout9.properties

Modified: logging/sandbox/log4j/pattern-layout/build.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/build.xml?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/build.xml (original)
+++ logging/sandbox/log4j/pattern-layout/build.xml Wed Apr 25 09:57:03 2007
@@ -36,7 +36,7 @@
     <property name="m2_repo" location="${user.home}/.m2/repository"/>
 
 	<!--  Versions for dependencies   -->
-    <property name="log4j.version" value="1.3alpha8"/>
+    <property name="log4j.version" value="1.2.14"/>
     <property name="junit.version" value="3.8.1"/>
     <property name="oro.version" value="2.0.8"/>
 	

Modified: logging/sandbox/log4j/pattern-layout/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/changes/changes.xml?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/changes/changes.xml (original)
+++ logging/sandbox/log4j/pattern-layout/src/changes/changes.xml Wed Apr 25 09:57:03 2007
@@ -1 +1 @@
-<!--
 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.

-->
<document>
  <properties>
    <title>Component</title>
  </properties>
  <body>
    <release version="0.1" date="2099-01-01" description="First release">
      <action dev="carnold" issue="42094" type="add">
   
      Initial release of Component framework backported from log4j 1.3.
      </action>
    </release>
  </body>
</document>
\ No newline at end of file
+<!--
 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.

-->
<document>
  <properties>
    <title>Component</title>
  </properties>
  <body>
    <release version="0.1" date="2099-01-01" description="First release">
      <action dev="carnold" issue="42094" type="add">
   
      Initial release of Enhanced Pattern Layout backported from log4j 1.3.
      </action>
    </release>
  </body>
</document>
\ No newline at end of file

Copied: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java (from r532381, logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/PatternLayout.java)
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java?view=diff&rev=532408&p1=logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/PatternLayout.java&r1=532381&p2=logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/PatternLayout.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -49,7 +50,7 @@
    right justification. The following is a simple example.
 
    <p>Let the conversion pattern be <b>"%-5p [%t]: %m%n"</b> and assume
-   that the log4j environment was set to use a PatternLayout. Then the
+   that the log4j environment was set to use a EnhancedPatternLayout. Then the
    statements
    <pre>
    Category root = Category.getRoot();
@@ -403,7 +404,7 @@
 
 
    @since 0.8.2 */
-public class PatternLayout extends Layout {
+public class EnhancedPatternLayout extends Layout {
   /** Default pattern string for log output. Currently set to the
       string <b>"%m%n"</b> which just prints the application supplied
       message. */
@@ -449,19 +450,19 @@
   private boolean handlesExceptions;
 
   /**
-     Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN.
+     Constructs a EnhancedPatternLayout using the DEFAULT_LAYOUT_PATTERN.
 
      The default pattern just produces the application supplied message.
   */
-  public PatternLayout() {
+  public EnhancedPatternLayout() {
     this(DEFAULT_CONVERSION_PATTERN);
   }
 
   /**
-    * Constructs a PatternLayout using the supplied conversion pattern.
+    * Constructs a EnhancedPatternLayout using the supplied conversion pattern.
    * @param pattern conversion pattern.
   */
-  public PatternLayout(final String pattern) {
+  public EnhancedPatternLayout(final String pattern) {
     this.conversionPattern = pattern;
     head = createPatternParser(
             (pattern == null) ? DEFAULT_CONVERSION_PATTERN : pattern).parse();
@@ -513,7 +514,7 @@
 
   /**
     Activates the conversion pattern. Do not forget to call this method after
-    you change the parameters of the PatternLayout instance.
+    you change the parameters of the EnhancedPatternLayout instance.
   */
   public void activateOptions() {
       // nothing to do.

Propchange: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/EnhancedPatternLayout.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggerRepository;
 import org.apache.log4j.spi.LoggingEvent;
 
 import java.util.ArrayList;

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternParser.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternParser.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternParser.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/BridgePatternParser.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -15,10 +16,6 @@
  */
 
 package org.apache.log4j.pattern;
-
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggerRepository;
-
 
 /**
  * The class implements the pre log4j 1.3 org.apache.log4j.helpers.PatternConverter

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/CachedDateFormat.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/CachedDateFormat.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/CachedDateFormat.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/CachedDateFormat.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -20,7 +21,6 @@
 import java.text.FieldPosition;
 import java.text.NumberFormat;
 import java.text.ParsePosition;
-
 import java.util.Date;
 import java.util.TimeZone;
 
@@ -251,11 +251,10 @@
     //   If millisecond pattern was not unrecognized 
     //     (that is if it was found or milliseconds did not appear)   
     //    
-    if (millisecondStart != UNRECOGNIZED_MILLISECONDS) {
+    if (millisecondStart != UNRECOGNIZED_MILLISECONDS &&
       //    Check if the cache is still valid.
       //    If the requested time is within the same integral second
       //       as the last request and a shorter expiration was not requested.
-      if (
         (now < (slotBegin + expiration)) && (now >= slotBegin)
           && (now < (slotBegin + 1000L))) {
         // 
@@ -272,7 +271,6 @@
         buf.append(cache);
 
         return buf;
-      }
     }
 
     //

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ClassNamePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ClassNamePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ClassNamePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ClassNamePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,8 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LocationInfo;
+import org.apache.log4j.spi.LoggingEvent;
 
 
 /**

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/DatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/DatePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/DatePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/DatePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -20,7 +21,6 @@
 import org.apache.log4j.spi.LoggingEvent;
 
 import java.text.SimpleDateFormat;
-
 import java.util.Date;
 import java.util.TimeZone;
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileDatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileDatePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileDatePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileDatePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -15,9 +16,6 @@
  */
 
 package org.apache.log4j.pattern;
-
-import org.apache.log4j.helpers.LogLog;
-
 
 /**
  * Formats an date by delegating to DatePatternConverter.  The default

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileLocationPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileLocationPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FileLocationPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,8 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LocationInfo;
+import org.apache.log4j.spi.LoggingEvent;
 
 
 /**

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FormattingInfo.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FormattingInfo.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FormattingInfo.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FormattingInfo.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -107,7 +108,7 @@
    * @param fieldStart start of field in buffer.
    * @param buffer buffer to be modified.
    */
-  public final void format(final int fieldStart, final StringBuffer buffer) {
+  public void format(final int fieldStart, final StringBuffer buffer) {
     final int rawLength = buffer.length() - fieldStart;
 
     if (rawLength > maxLength) {

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FullLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FullLocationPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FullLocationPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/FullLocationPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,8 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LocationInfo;
+import org.apache.log4j.spi.LoggingEvent;
 
 
 /**

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/IntegerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/IntegerPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/IntegerPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/IntegerPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -15,8 +16,6 @@
  */
 
 package org.apache.log4j.pattern;
-
-import org.apache.log4j.helpers.LogLog;
 
 import java.util.Date;
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LevelPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LevelPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LevelPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LevelPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -17,7 +18,6 @@
 package org.apache.log4j.pattern;
 
 import org.apache.log4j.Level;
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineLocationPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineLocationPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineLocationPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,8 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LocationInfo;
+import org.apache.log4j.spi.LoggingEvent;
 
 
 /**

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineSeparatorPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineSeparatorPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineSeparatorPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LineSeparatorPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -17,7 +18,6 @@
 package org.apache.log4j.pattern;
 
 import org.apache.log4j.Layout;
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LiteralPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LiteralPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LiteralPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LiteralPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggerPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggerPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggerPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggingEventPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggingEventPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggingEventPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/LoggingEventPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MessagePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MessagePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MessagePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MessagePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MethodLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MethodLocationPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MethodLocationPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/MethodLocationPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,9 +17,8 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LocationInfo;
+import org.apache.log4j.spi.LoggingEvent;
 
 
 /**

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NDCPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NDCPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NDCPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NDCPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NameAbbreviator.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NameAbbreviator.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NameAbbreviator.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NameAbbreviator.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NamePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NamePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NamePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/NamePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternParser.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternParser.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PatternParser.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,11 +17,10 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.helpers.Loader;
+import org.apache.log4j.helpers.LogLog;
 
 import java.lang.reflect.Method;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -28,13 +28,12 @@
 import java.util.Map;
 import java.util.Set;
 
-
 // Contributors:   Nelson Minar <(n...@monkey.org>
 //                 Igor E. Poteryaev <ja...@mail.ru>
 //                 Reinhard Deschler <re...@web.de>
 
 /**
- * Most of the work of the {@link org.apache.log4j.PatternLayout} class
+ * Most of the work of the {@link org.apache.log4j.EnhancedPatternLayout} class
  * is delegated to the PatternParser class.
  * <p>It is this class that parses conversion patterns and creates
  * a chained list of {@link PatternConverter PatternConverters}.
@@ -79,7 +78,7 @@
   private static final int MAX_STATE = 5;
 
   /**
-   * Standard format specifiers for PatternLayout.
+   * Standard format specifiers for EnhancedPatternLayout.
    */
   private static final Map PATTERN_LAYOUT_RULES;
 
@@ -153,7 +152,7 @@
   }
 
   /**
-   * Get standard format specifiers for PatternLayout.
+   * Get standard format specifiers for EnhancedPatternLayout.
    * @return read-only map of format converter classes keyed by format specifier strings.
    */
   public static Map getPatternLayoutRules() {

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PropertiesPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PropertiesPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PropertiesPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/PropertiesPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,12 +17,16 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
-import java.io.*;
 import org.apache.log4j.spi.LoggingEvent;
-import java.lang.reflect.*;
 
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.*;
+import java.util.Iterator;
+import java.util.Set;
+import org.apache.log4j.helpers.*;
 
 
 /**
@@ -41,6 +46,7 @@
    * Name of property to output.
    */
   private final String option;
+  private final Method getKeySetMethod;
 
   /**
    * Private constructor.
@@ -52,11 +58,24 @@
       ((options != null) && (options.length > 0))
       ? ("Property{" + options[0] + "}") : "Properties", "property");
 
+      //
+      //  log4j 1.2.15 and later will have method to get names
+      //     of all keys in MDC
+      //
+    Method getMethod = null;
+
     if ((options != null) && (options.length > 0)) {
       option = options[0];
     } else {
       option = null;
+      try {
+         getMethod = LoggingEvent.class.getMethod(
+                    "getPropertyKeySet", null);
+      } catch(Exception ex) {
+          getMethod = null;
+      }
     }
+    getKeySetMethod = getMethod;
   }
 
   /**
@@ -82,11 +101,17 @@
       //  MDC keys are not visible prior to log4j 1.2.15
       //
       Set keySet = null;
-      try {
-          Method getKeySetMethod = LoggingEvent.class.getMethod(
-                  "getPropertyKeySet", null);
-          keySet = (Set) getKeySetMethod.invoke(event, null);
-      } catch(Exception ex) {
+      if (getKeySetMethod != null) {
+          try {
+            keySet = (Set) getKeySetMethod.invoke(event, null);
+          } catch(InvocationTargetException ex) {
+              LogLog.error("Exception while calling LoggingEvent.getKeySetMethod",
+                      ex.getTargetException());
+          } catch(Exception ex) {
+              LogLog.error("Exception while calling LoggingEvent.getKeySetMethod",
+                      ex);
+          }
+      } else {
           //
           //  for 1.2.14 and earlier could serialize and
           //    extract MDC content
@@ -116,8 +141,8 @@
                 }
                 is.close();
             }
-          } catch(Exception ex2) {
-
+          } catch(Exception ex) {
+              LogLog.error("Unexpected exception while extracting MDC keys", ex);
           }
       }
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/RelativeTimePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/RelativeTimePatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/RelativeTimePatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/RelativeTimePatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/SequenceNumberPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/SequenceNumberPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/SequenceNumberPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/SequenceNumberPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThreadPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThreadPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThreadPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThreadPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/main/java/org/apache/log4j/pattern/ThrowableInformationPatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *
@@ -16,7 +17,6 @@
 
 package org.apache.log4j.pattern;
 
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.ThrowableInformation;
 

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternLayout.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternLayout.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternLayout.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternLayout.java Wed Apr 25 09:57:03 2007
@@ -20,7 +20,7 @@
 
 /**
 
-  Example showing how to extend PatternLayout to recognize additional
+  Example showing how to extend EnhancedPatternLayout to recognize additional
   conversion characters.  
   
   <p>In this case MyPatternLayout recognizes %# conversion pattern. It
@@ -31,10 +31,10 @@
   for more details.
 
   @see MyPatternParser
-  @see org.apache.log4j.PatternLayout
-  @author Anders Kristensen 
+  @see org.apache.log4j.EnhancedPatternLayout
+ @author Anders Kristensen
 */
-public class MyPatternLayout extends PatternLayout {
+public class MyPatternLayout extends EnhancedPatternLayout {
   public
   MyPatternLayout() {
     this(DEFAULT_CONVERSION_PATTERN);

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternParser.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternParser.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternParser.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/MyPatternParser.java Wed Apr 25 09:57:03 2007
@@ -26,7 +26,7 @@
   Example showing how to extend PatternParser to recognize additional
   conversion characters.  The examples shows that minimum and maximum
   width and alignment settings apply for "extension" conversion
-  characters just as they do for PatternLayout recognized characters.
+  characters just as they do for EnhancedPatternLayout recognized characters.
   
   <p>In this case MyPatternParser recognizes %# and outputs the value
   of an internal counter which is also incremented at each call.
@@ -36,9 +36,9 @@
   
   @see org.apache.log4j.MyPatternLayout
   @see org.apache.log4j.helpers.PatternParser
-  @see org.apache.log4j.PatternLayout
+  @see org.apache.log4j.EnhancedPatternLayout
 
-  @author Anders Kristensen 
+ @author Anders Kristensen
 */
 public class MyPatternParser extends PatternParser {
 

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTest.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTest.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTest.java Wed Apr 25 09:57:03 2007
@@ -21,7 +21,7 @@
 
 
 /**
- * Test for PatternLayout.
+ * Test for EnhancedPatternLayout.
  *
  * @author Curt Arnold
  */
@@ -39,7 +39,7 @@
    * @{inheritDoc}
    */
   protected Layout createLayout() {
-    return new PatternLayout("[%t] %p %c - %m%n");
+    return new EnhancedPatternLayout("[%t] %p %c - %m%n");
   }
 
   /**
@@ -50,7 +50,7 @@
     LoggingEvent event =
       new LoggingEvent(
         "org.apache.log4j.Logger", logger, Level.INFO, "Hello, World", null);
-    PatternLayout layout = (PatternLayout) createLayout();
+    EnhancedPatternLayout layout = (EnhancedPatternLayout) createLayout();
     String result = layout.format(event);
     StringBuffer buf = new StringBuffer(100);
     buf.append('[');
@@ -69,7 +69,7 @@
    * Tests getPatternFormat().
    */
   public void testGetPatternFormat() {
-    PatternLayout layout = (PatternLayout) createLayout();
+    EnhancedPatternLayout layout = (EnhancedPatternLayout) createLayout();
     assertEquals("[%t] %p %c - %m%n", layout.getConversionPattern());
   }
 
@@ -77,7 +77,7 @@
    * Tests DEFAULT_CONVERSION_PATTERN constant.
    */
   public void testDefaultConversionPattern() {
-    assertEquals("%m%n", PatternLayout.DEFAULT_CONVERSION_PATTERN);
+    assertEquals("%m%n", EnhancedPatternLayout.DEFAULT_CONVERSION_PATTERN);
   }
 
   /**
@@ -85,7 +85,7 @@
    */
   public void testTTCCConversionPattern() {
     assertEquals(
-      "%r [%t] %p %c %x - %m%n", PatternLayout.TTCC_CONVERSION_PATTERN);
+      "%r [%t] %p %c %x - %m%n", EnhancedPatternLayout.TTCC_CONVERSION_PATTERN);
   }
 
   /**
@@ -104,7 +104,7 @@
     LoggingEvent event1 =
       new LoggingEvent(
         "org.apache.log4j.Logger", logger, Level.DEBUG, new String(msg), null);
-    PatternLayout layout = (PatternLayout) createLayout();
+    EnhancedPatternLayout layout = (EnhancedPatternLayout) createLayout();
     String result = layout.format(event1);
     LoggingEvent event2 =
       new LoggingEvent(
@@ -116,7 +116,7 @@
   /**
    * Class to ensure that protected members are still available.
    */
-  private static final class DerivedPatternLayout extends PatternLayout {
+  private static final class DerivedPatternLayout extends EnhancedPatternLayout {
     /**
      * Constructs a new instance of DerivedPatternLayout.
      */

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTestCase.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTestCase.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTestCase.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/PatternLayoutTestCase.java Wed Apr 25 09:57:03 2007
@@ -366,7 +366,7 @@
   }
 
     /**
-     * Tests log4j 1.2 style extension of PatternLayout.
+     * Tests log4j 1.2 style extension of EnhancedPatternLayout.
      * Was test14 in log4j 1.2.
      * @throws Exception
      */
@@ -450,7 +450,7 @@
     String mdcMsgPattern5 = "%m : %X{key1},%X{key2},%X{key3}%n";
     
     // set up appender
-    PatternLayout layout = new PatternLayout("%m%n");
+    EnhancedPatternLayout layout = new EnhancedPatternLayout("%m%n");
     Appender appender = new FileAppender(layout, OUTPUT_FILE, false);
             
     // set appender on root and set level to debug

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/CachedDateFormatTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/CachedDateFormatTest.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/CachedDateFormatTest.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/CachedDateFormatTest.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/FormattingInfoTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/FormattingInfoTest.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/FormattingInfoTest.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/FormattingInfoTest.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/NameAbbreviatorTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/NameAbbreviatorTest.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/NameAbbreviatorTest.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/NameAbbreviatorTest.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  *

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/Num343PatternConverter.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  * 

Modified: logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/PatternParserTest.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/PatternParserTest.java?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/PatternParserTest.java (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/java/org/apache/log4j/pattern/PatternParserTest.java Wed Apr 25 09:57:03 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
  * 
@@ -32,28 +33,22 @@
 import org.apache.log4j.Level;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.spi.LoggerRepository;
 import org.apache.log4j.spi.LoggingEvent;
 
 
 /**
-   Test case for helpers/PatternParser.java. Tests the various
+   Test case for PatternParser.java. Tests the various
    conversion patterns supported by PatternParser. This test
-   class tests PatternParser via the PatternLayout class which
+   class tests PatternParser via the EnhancedPatternLayout class which
    uses it.
  */
 public class PatternParserTest extends TestCase {
-  Logger logger = Logger.getLogger("org.foobar");
-  LoggingEvent event;
-  long now;
-  LoggerRepository repository;
-  
+  private final Logger logger = Logger.getLogger("org.foobar");
+  private final LoggingEvent event;
+
   public PatternParserTest(String name) {
     super(name);
-    repository = LogManager.getLoggerRepository();
-    now = System.currentTimeMillis() + 13;
-
     event = new LoggingEvent("org.apache.log4j.Logger",
             logger, Level.INFO, "msg 1", null);
   }
@@ -115,7 +110,7 @@
   public void testBasic2() throws Exception {
     String result = convert("%relative %-5level [%thread] %logger - %m%n", null, event);
 
-    long expectedRelativeTime = now - LoggingEvent.getStartTime();
+    long expectedRelativeTime = event.timeStamp - LoggingEvent.getStartTime();
     assertEquals(expectedRelativeTime + " INFO  [main] "+logger.getName()+" - msg 1" + Layout.LINE_SEP, result);
   }
 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout.mdc.1.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout.mdc.1.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout.mdc.1.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout.mdc.1.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File=output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout 
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout 
 log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m %X%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout1.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout1.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout1.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout1.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootLogger=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.file=output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout 
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout 
 log4j.appender.testAppender.layout.ConversionPattern=%-5p - %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout10.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout10.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout10.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout10.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File= output/temp 
 log4j.appender.testAppender.Append= false 
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout 
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout 
 log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %l: %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout11.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout11.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout11.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout11.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File=output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
 log4j.appender.testAppender.layout.ConversionPattern=%-5p [%t] %c{2}: %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout12.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout12.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout12.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout12.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File=output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
 log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C.%M(%F:%L): %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout13.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout13.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout13.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout13.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File=  output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
 log4j.appender.testAppender.layout.ConversionPattern=[%t] %-5p %C{3}.%M(%F:%L): %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output. 

Modified: logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout14.properties
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout14.properties?view=diff&rev=532408&r1=532407&r2=532408
==============================================================================
--- logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout14.properties (original)
+++ logging/sandbox/log4j/pattern-layout/src/test/resources/org/apache/log4j/patternLayout14.properties Wed Apr 25 09:57:03 2007
@@ -1,8 +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.
 log4j.rootCategory=DEBUG, testAppender
 log4j.appender.testAppender=org.apache.log4j.FileAppender
 log4j.appender.testAppender.File=output/temp
 log4j.appender.testAppender.Append=false
-log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.testAppender.layout=org.apache.log4j.EnhancedPatternLayout
 log4j.appender.testAppender.layout.ConversionPattern=%-5p [%t] %c{1.}: %m%n
 
 #  Prevent internal log4j DEBUG messages from polluting the output.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org