MaxonT commented on code in PR #6882:
URL: https://github.com/apache/jmeter/pull/6882#discussion_r4737111413
##########
xdocs/usermanual/get-started.xml:
##########
@@ -722,6 +722,13 @@ LoggerFactory.getLogger(Foo.class);</source>
to define the log file using the test plan name,
e.g. for the test plan <code>Test27.jmx</code> the log file is set to
<code>Test27.log</code>.
</p>
+ <p>
+ The default <code>log4j2.xml</code> reads the log file name from the
<code>jmeter.logfile</code> system property.
+ Logging is initialised before <code>system.properties</code> (or a
file given with <code>-S</code>) is loaded,
+ so setting <code>jmeter.logfile</code> in those files has no effect.
+ Use the <code>-j</code> option, or pass
<code>-Djmeter.logfile=/path/to/file.log</code> to the JVM through
+ <code>JVM_ARGS</code>, for example in <code>setenv.sh</code> or
<code>setenv.bat</code>.
Review Comment:
Thanks, that's a good catch. A `-D` after the `jmeter` command is the
obvious next thing to try, and the page would have left it unanswered. I
applied your suggestion as written in 3a0e647. I also checked it against
`bin/jmeter` line 204, where `$JVM_ARGS` comes before `-jar ApacheJMeter.jar
"$@"`, so arguments after the command only reach JMeter once the JVM is already
running. I haven't run the Gradle docs build.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]