jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1225675 - /jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java
Date Thu, 29 Dec 2011 22:21:31 GMT
Author: pmouawad
Date: Thu Dec 29 22:21:31 2011
New Revision: 1225675

URL: http://svn.apache.org/viewvc?rev=1225675&view=rev
Log:
Added warning when formatting fails

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java?rev=1225675&r1=1225674&r2=1225675&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java Thu Dec 29
22:21:31 2011
@@ -29,6 +29,8 @@ import org.apache.jmeter.testelement.pro
 import org.apache.jmeter.testelement.property.LongProperty;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.log.Logger;
 
 /**
  * Provides a counter per-thread(user) or per-thread group.
@@ -64,6 +66,8 @@ public class CounterConfig extends Abstr
     // Used for per-thread/user storage of increment in Thread Group Main loop
     private transient ThreadLocal<Long> perTheadLastIterationNumber;
 
+	private static final Logger log = LoggingManager.getLoggerForClass();
+
     private void init() {
         perTheadNumber = new ThreadLocal<Long>() {
             @Override
@@ -134,7 +138,9 @@ public class CounterConfig extends Abstr
                 DecimalFormat myFormatter = new DecimalFormat(format);
                 return myFormatter.format(value);
             } catch (NumberFormatException ignored) {
+            	log.warn("Error formating "+value + " at format:"+format+", using default");
             } catch (IllegalArgumentException ignored) {
+            	log.warn("Error formating "+value + " at format:"+format+", using default");
             }
         }
         return Long.toString(value);



Mime
View raw message