Pardon me, nevermind, I should have did a little more trial & error before posting. Figured it out now.
The default constructor for LoggingManager works fine, I was missing reference to org.apache.log.Logger, which is Apache package but outside JMeter ones. I found it to be under lib/logkit-2.0.jar. I also had to find jorphan-2.6.jar online which didn't seem to be already within JMeter libs. On Wed, Sep 30, 2015 at 6:35 PM, David Luu <[email protected]> wrote: > I hope this is not more of a JMeter developer mailing list question. If > so, please let me know. > > I'm using a JMeter plugin: https://github.com/BrightTag/kafkameter > > as such with that plugin, I'm implementing a custom message generator in > Java for the plugin to use to generate load. For the most part it is in > ways similar to a Java sampler in JMeter. > > From that plugin project, came across this helpful post on how to get/set > JMeter variables from Java: > > > https://newspaint.wordpress.com/2012/11/28/creating-a-java-sampler-for-jmeter > > What is not clear to me so far, is how I can log a message to JMeter that > shows up in the log (when viewed in JMeter GUI and viewing jmeter.log). > What class package do I reference/use? What sample code available? I took a > brief look over the JMeter classes and found > > > https://jmeter.apache.org/api/org/apache/jorphan/logging/LoggingManager.html > > but it's not clear to me how I can instantiate it and tie it to the > particular Java class (~sampler) to log something. For a usable in any case > question, I'd like to know how I can instantiate that logger with the > constructors that pass in a particular category name rather than the > default one that assumes the calling class translates appropriately for > JMeter to log things. > > Any help here appreciated. >
