You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "Ninja-Cyborg (via GitHub)" <gi...@apache.org> on 2023/04/15 00:33:45 UTC

[GitHub] [jmeter] Ninja-Cyborg commented on issue #5771: JMeter appears to ignore the -S value

Ninja-Cyborg commented on issue #5771:
URL: https://github.com/apache/jmeter/issues/5771#issuecomment-1509428327

   In documentation it's mentioned that 3.2 onwards, Jmeter use configuration from log4j2 configuration file instead system.properties: https://jmeter.apache.org/usermanual/get-started.html#logging
   
   Since by default the location is read through log4j2.xml file, configuration through system.properties may got ignored. Modifying filename through log4j2.xml was successful, but it is not cleanest. 
   
   # Create new log file (work around)
   - log4j2.xml Original line of code: <File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}"  append="false">
   - ![image](https://user-images.githubusercontent.com/66517017/232174040-f8da64a0-5f6a-45ad-a11d-c0951797b501.png)
   - Modified code: <File name="jmeter-log" fileName="${sys:jmeter1.logfile:-logfileQ.log}"  append="false">
   - ![image](https://user-images.githubusercontent.com/66517017/232173951-fc4e3991-fe67-4462-87c6-7c86b321d878.png)
   - Replace logfileQ.log with desired file name
   - Changed the name of XQuery variable(jmeter.logfile) to make it work
   
   ## Reason: Changing variable name (sys:jmeter.logfile)
   - I could not find how and where the variable for filename, been used. So, to change the logfile name, the variable name was changed. Otherwise, no new file gets generated.
   - This will create a new log file as specified, but the logs still get duplicated in jmeter.log file
   - Knowing the use of variable may help avoid changing default variable name
   
   ## JMeter Version
   5.5
   
   ## Java Version
   java version "18.0.2.1" 2022-08-18
   
   ## OS Version
   Microsoft Windows 10 Pro [Version:19044.2486]
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org