jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1755002 - in /jmeter/trunk: src/functions/org/apache/jmeter/functions/LogFunction.java src/jorphan/org/apache/jorphan/logging/LoggingManager.java xdocs/changes.xml
Date Tue, 02 Aug 2016 20:27:19 GMT
Author: pmouawad
Date: Tue Aug  2 20:27:19 2016
New Revision: 1755002

URL: http://svn.apache.org/viewvc?rev=1755002&view=rev
Log:
Bug 59924 - The log level of XXX package is set to DEBUG if log_level.XXXX property value
contains spaces, same for __log function
Bugzilla Id: 59924

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/logging/LoggingManager.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java?rev=1755002&r1=1755001&r2=1755002&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java Tue Aug  2 20:27:19
2016
@@ -142,7 +142,7 @@ public class LogFunction extends Abstrac
             printDetails(System.err, s, t, c);
         } else {
             // N.B. if the string is not recognised, DEBUG is assumed
-            Priority p = Priority.getPriorityForName(prio);
+            Priority p = Priority.getPriorityForName(prio.trim());
             if (log.isPriorityEnabled(p)) {// Thread method is potentially expensive
                 String tn = Thread.currentThread().getName();
                 StringBuilder sb = new StringBuilder(40);

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/logging/LoggingManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/logging/LoggingManager.java?rev=1755002&r1=1755001&r2=1755002&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/logging/LoggingManager.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/logging/LoggingManager.java Tue Aug  2 20:27:19
2016
@@ -272,7 +272,7 @@ public final class LoggingManager {
      * @param category - string containing the category
      */
     public static void setPriority(String priority, String category) {
-        setPriority(Priority.getPriorityForName(priority), category);
+        setPriority(Priority.getPriorityForName(trimPriority(priority)), category);
     }
 
     /**
@@ -282,7 +282,7 @@ public final class LoggingManager {
      * @param fullName - e.g. org.apache.jmeter.etc, will have the prefix removed.
      */
     public static void setPriorityFullName(String priority, String fullName) {
-        setPriority(Priority.getPriorityForName(priority), removePrefix(fullName));
+        setPriority(Priority.getPriorityForName(trimPriority(priority)), removePrefix(fullName));
     }
 
     /**
@@ -296,7 +296,15 @@ public final class LoggingManager {
     }
 
     public static void setPriority(String p) {
-        setPriority(Priority.getPriorityForName(p));
+        setPriority(Priority.getPriorityForName(trimPriority(p)));
+    }
+    
+    /**
+     * @param priority String log priority
+     * @return String trimmed priority
+     */
+    private static final String trimPriority(String priority) {
+        return priority.trim();
     }
 
     /**

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1755002&r1=1755001&r2=1755002&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Aug  2 20:27:19 2016
@@ -122,6 +122,7 @@ Summary
     is given in JDBC Connection Configuration.</li>
     <li><bug>59918</bug>Ant generated HTML report is broken (extras folder)</li>
     <li><bug>57493</bug>Create a documentation page for properties</li>
+    <li><bug>59924</bug>The log level of XXX package is set to DEBUG if
<code>log_level.XXXX</code> property value contains spaces, same for __log function</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>



Mime
View raw message