Override default log location for JMeter when launching with Java (not command line)

STMM :

Is there an equivalent of the -j command-line option when launching JMeter using Java?

I'm running a series of test scripts that each need to have a custom log name - normally I'd just define each log location using -j, but in these cases they need to be launched through Java.

Dmitri T :
  1. If you have possibility to amend the java code and invoke System.setProperty function :

    System.setProperty("jmeter.logfile", "/desired/path/to/jmeter.log)"
    
  2. If you don't:

    • either pass the property via -D command line argument like:

      java -Djmeter.logfile=/desired/path/to/jmeter.log ....
      
    • or add the next line to system.properties file:

      jmeter.logfile=/desired/path/to/jmeter.log 
      

More information:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=106846&siteId=1