jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1853264 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java
Date Sat, 09 Feb 2019 12:41:18 GMT
Author: fschumacher
Date: Sat Feb  9 12:41:17 2019
New Revision: 1853264

URL: http://svn.apache.org/viewvc?rev=1853264&view=rev
Log:
Use log string formatting.

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java?rev=1853264&r1=1853263&r2=1853264&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java Sat Feb  9 12:41:17
2019
@@ -106,10 +106,10 @@ public class FileToString extends Abstra
             if(file.exists() && file.canRead()) {
                 myValue = FileUtils.readFileToString(new File(fileName), encoding);
             } else {
-                log.warn("Could not read open: "+fileName+" ");
+                log.warn("Could not read open: {} ", fileName);
             }
         } catch (IOException e) {
-            log.warn("Could not read file: "+fileName+" "+e.getMessage(), e);
+            log.warn("Could not read file: {} {}", fileName, e.getMessage(), e);
         }
 
         if (myName.length() > 0) {
@@ -120,9 +120,7 @@ public class FileToString extends Abstra
         }
 
         if (log.isDebugEnabled()) {
-            String tn = Thread.currentThread().getName();
-            log.debug(tn + " name:" //$NON-NLS-1$
-                    + myName + " value:" + myValue);//$NON-NLS-1$
+            log.debug("{} name: {} value: {}", Thread.currentThread().getName(), myName,
myValue); //$NON-NLS-1$
         }
 
         return myValue;



Mime
View raw message