sebb 2003/11/18 09:49:04
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
HTTPSampler.java
Log:
Tidy up logging and debug a bit
Revision Changes Path
1.56 +13 -5
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
Index: HTTPSampler.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- HTTPSampler.java 21 Oct 2003 12:59:01 -0000 1.55
+++ HTTPSampler.java 18 Nov 2003 17:49:04 -0000 1.56
@@ -791,9 +791,17 @@
in = new BufferedInputStream(conn.getInputStream());
}
}
+ catch(IOException e){
+ if (e.getCause() instanceof FileNotFoundException){
+ log.warn(e.getCause().toString());
+ } else {
+ log.error("Getting error message from server",e);
+ }
+ in = new BufferedInputStream(conn.getErrorStream());
+ }
catch (Exception e)
{
- log.info("Getting error message from server",e);
+ log.warn("Getting error message from server",e);
in = new BufferedInputStream(conn.getErrorStream());
}
java.io.ByteArrayOutputStream w = new ByteArrayOutputStream();
@@ -1059,7 +1067,7 @@
*/
private SampleResult sample(int redirects)
{
- log.debug("Start : sample2");
+ log.debug("Start : sample, redirects ="+redirects);
long time = System.currentTimeMillis();
SampleResult res = new SampleResult();
URL u = null;
@@ -1135,7 +1143,7 @@
res.setSuccessful(false);
}
res.setTime(time);
- log.debug("End : sample2");
+ log.debug("End : sample, redirects="+redirects);
if (isImageParser())
{
if (imageSampler == null)
@@ -1172,7 +1180,7 @@
{}
}
- log.debug("End : sample2");
+ log.debug("End : sample, redirects="+redirects);
return res;
}
protected void disconnect(HttpURLConnection conn)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]