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]



Reply via email to