logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1469882 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java api/src/test/java/org/apache/logging/log4j/LoggerTest.java src/changes/changes.xml
Date Fri, 19 Apr 2013 15:12:26 GMT
Author: rgoers
Date: Fri Apr 19 15:12:26 2013
New Revision: 1469882

URL: http://svn.apache.org/r1469882
Log:
LOG4J2-211 - Removing extra spaces in entry and exit method output.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/LoggerTest.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1469882&r1=1469881&r2=1469882&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
Fri Apr 19 15:12:26 2013
@@ -383,9 +383,9 @@ public abstract class AbstractLogger imp
 
     private Message entryMsg(final int count, final Object... params) {
         if (count == 0) {
-            return messageFactory.newMessage(" entry");
+            return messageFactory.newMessage("entry");
         }
-        final StringBuilder sb = new StringBuilder(" entry parms(");
+        final StringBuilder sb = new StringBuilder("entry params(");
         int i = 0;
         for (final Object parm : params) {
             if (parm != null) {
@@ -1404,9 +1404,9 @@ public abstract class AbstractLogger imp
 
     private Message toExitMsg(final Object result) {
         if (result == null) {
-            return messageFactory.newMessage(" exit");
+            return messageFactory.newMessage("exit");
         }
-        return messageFactory.newMessage(" exit with (" + result + ")");
+        return messageFactory.newMessage("exit with(" + result + ")");
     }
 
     /**

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=1469882&r1=1469881&r2=1469882&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
Fri Apr 19 15:12:26 2013
@@ -39,11 +39,11 @@ public class LoggerTest {
     private static class TestParameterizedMessageFactory {
         // empty
     }
-    
+
     private static class TestStringFormatterMessageFactory {
         // empty
     }
-    
+
     TestLogger logger = (TestLogger) LogManager.getLogger("LoggerTest");
     List<String> results = logger.getEntries();
 
@@ -52,8 +52,8 @@ public class LoggerTest {
         logger.entry();
         logger.exit();
         assertEquals(2, results.size());
-        assertTrue("Incorrect Entry", results.get(0).startsWith(" TRACE  entry"));
-        assertTrue("incorrect Exit", results.get(1).startsWith(" TRACE  exit"));
+        assertTrue("Incorrect Entry", results.get(0).startsWith(" TRACE entry"));
+        assertTrue("incorrect Exit", results.get(1).startsWith(" TRACE exit"));
 
     }
 
@@ -232,7 +232,7 @@ public class LoggerTest {
                 ParameterizedMessageFactory.INSTANCE);
         //TODO: How to test?
         //This test context always creates new loggers, other test context impls I tried
fail other tests.
-        //assertEquals(messageFactory, testLogger2.getMessageFactory());        
+        //assertEquals(messageFactory, testLogger2.getMessageFactory());
         testLogger.debug("%,d", Integer.MAX_VALUE);
         assertEquals(1, testLogger.getEntries().size());
         assertEquals(String.format(" DEBUG %,d", Integer.MAX_VALUE), testLogger.getEntries().get(0));

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1469882&r1=1469881&r2=1469882&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Fri Apr 19 15:12:26 2013
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0-beta5" date="@TBD@" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-211" dev="rgoers" type="fix" due-to="Nick Williams">
+        Removing extra spaces in entry and exit method output.
+      </action>
       <action issue="LOG4J2-214" dev="rgoers" type="update" due-to="Remko Popma">
         Async documentation update.
       </action>



Mime
View raw message