Implement SampleListener. And create a GUI for it. The later is a pain, so if you're using the latest code from CVS or a recent nightly, you may want to try the new TestBean feature: just have your SampleListener extend TestBean and JMeter will automagically create a GUI for it.

Let me know how you fare with this TestBean thing.

--
Salut,

Jordi.

Cameron Taggart wrote:
Following the directions at http://jakarta.apache.org/jmeter/extending/#listener, I've created my own class named LoggingSampleListner which implement SampleListener. For now, I just want the listener to log out some info via Log4J. I compiled the class, put it in a jar and put the lib\etc directory. What else must I do to enable this very basic listener?

Thanks,
Cameron

private static final Logger logger = Logger.getLogger( LoggingSampleListener.class );

 public void sampleOccurred( SampleEvent e ) {
   SampleResult r = e.getResult(  );
   byte[]       b = r.getResponseData(  );
   logger.info( "sampleOccured(), " + new String( b ) );
   System.out.println( "sampleOccured()");
 }

 public void sampleStarted( SampleEvent e ) {
   logger.info( "sampleStarted() ");
   System.out.println( "sampleStarted()");
 }

 public void sampleStopped( SampleEvent e ) {
   logger.info( "sampleStopped() ");
   System.out.println( "sampleStopped()");
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to