jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1849752 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java
Date Wed, 26 Dec 2018 10:36:03 GMT
Author: fschumacher
Date: Wed Dec 26 10:36:02 2018
New Revision: 1849752

URL: http://svn.apache.org/viewvc?rev=1849752&view=rev
Log:
Use log format strings

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

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java?rev=1849752&r1=1849751&r2=1849752&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java Wed Dec 26 10:36:02
2018
@@ -75,7 +75,7 @@ public final class FileWrapper {
     private static String checkDefault(String file) {
         if (file.length() == 0) {
             if (fileContainers.size() == 1 && defaultFile.length() > 0) {
-                log.warn("Using default: " + defaultFile);
+                log.warn("Using default: {}", defaultFile);
                 file = defaultFile;
             } else {
                 log.error("Cannot determine default file name");
@@ -88,7 +88,7 @@ public final class FileWrapper {
      * called by CSVRead(file,alias)
      */
     public static synchronized void open(String file, String alias) {
-        log.info("Opening " + file + " as " + alias);
+        log.info("Opening {} as {}", file, alias);
         file = checkDefault(file);
         if (alias.length() == 0) {
             log.error("Alias cannot be empty");
@@ -99,7 +99,7 @@ public final class FileWrapper {
             FileRowColContainer frcc;
             try {
                 frcc = getFile(file, alias);
-                log.info("Stored " + file + " as " + alias);
+                log.info("Stored {} as {}", file, alias);
                 m.put(alias, new FileWrapper(frcc));
             } catch (IOException e) {
                 // Already logged
@@ -112,7 +112,7 @@ public final class FileWrapper {
         if ((frcc = fileContainers.get(alias)) == null) {
             frcc = new FileRowColContainer(file);
             fileContainers.put(alias, frcc);
-            log.info("Saved " + file + " as " + alias + " delimiter=<" + frcc.getDelimiter()
+ ">");
+            log.info("Saved {} as {} delimiter=<{}>", file, alias, frcc.getDelimiter());
             if (defaultFile.length() == 0) {
                 defaultFile = file;// Save in case needed later
             }
@@ -130,7 +130,7 @@ public final class FileWrapper {
         Map<String, FileWrapper> my = filePacks.get();
         FileWrapper fw = my.get(file);
         if (fw == null) {
-            log.warn("endRow(): no entry for " + file);
+            log.warn("endRow(): no entry for {}", file);
         } else {
             fw.endRow();
         }
@@ -149,10 +149,10 @@ public final class FileWrapper {
         if (fw == null) // First call
         {
             if (file.startsWith("*")) { //$NON-NLS-1$
-                log.warn("Cannot perform initial open using alias " + file);
+                log.warn("Cannot perform initial open using alias {}", file);
             } else {
                 file = checkDefault(file);
-                log.info("Attaching " + file);
+                log.info("Attaching {}", file);
                 open(file, file);
                 fw = my.get(file);
             }
@@ -199,7 +199,7 @@ public final class FileWrapper {
         Map<String, FileWrapper> my = filePacks.get();
         for (Iterator<Map.Entry<String, FileWrapper>>  i = my.entrySet().iterator();
i.hasNext();) {
             Map.Entry<String, FileWrapper> fw = i.next();
-            log.info("Removing " + fw.toString());
+            log.info("Removing {}", fw);
             i.remove();
         }
         fileContainers.clear();



Mime
View raw message