jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1815730 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java
Date Sun, 19 Nov 2017 12:28:00 GMT
Author: fschumacher
Date: Sun Nov 19 12:28:00 2017
New Revision: 1815730

URL: http://svn.apache.org/viewvc?rev=1815730&view=rev
Log:
Use parameters for log-messages

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java?rev=1815730&r1=1815729&r2=1815730&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HC4CookieHandler.java
Sun Nov 19 12:28:00 2017
@@ -108,7 +108,7 @@ public class HC4CookieHandler implements
             boolean checkCookies, String cookieHeader, URL url) {
             boolean debugEnabled = log.isDebugEnabled();
             if (debugEnabled) {
-                log.debug("Received Cookie: " + cookieHeader + " From: " + url.toExternalForm());
+                log.debug("Received Cookie: {} From: {}", cookieHeader, url.toExternalForm());
             }
             String protocol = url.getProtocol();
             String host = url.getHost();
@@ -156,11 +156,12 @@ public class HC4CookieHandler implements
                     } else {
                         cookieManager.removeMatchingCookies(newCookie);
                         if (debugEnabled){
-                            log.info("Dropping expired Cookie: "+newCookie.toString());
+                            log.info("Dropping expired Cookie: {}", newCookie.toString());
                         }
                     }
                 } catch (MalformedCookieException e) { // This means the cookie was wrong
for the URL
-                    log.warn("Not storing invalid cookie: <"+cookieHeader+"> for URL
"+url+" ("+e.getLocalizedMessage()+")");
+                log.warn("Not storing invalid cookie: <{}> for URL {} ({})",
+                        cookieHeader, url, e.getLocalizedMessage());
                 } catch (IllegalArgumentException e) {
                     log.warn(cookieHeader+e.getLocalizedMessage());
                 }
@@ -175,7 +176,7 @@ public class HC4CookieHandler implements
         
         boolean debugEnabled = log.isDebugEnabled();
         if (debugEnabled){
-            log.debug("Found "+c.size()+" cookies for "+url.toExternalForm());
+            log.debug("Found {} cookies for {}", c.size(), url.toExternalForm());
         }
         if (c.isEmpty()) {
             return null;



Mime
View raw message