Am 22.02.21 um 05:47 schrieb Owen Pahl: > Hi All, > > I'm having a bit of trouble logging a specific HTTP header for each sampler > & subResult to the JMeter results log. This value of this field can change > even within the resources in a page. > > I am aware of the sample_variables property (and use it regularly) however > from what I could work out from the source, it uses the same value for a > sampleResult and all it's subResults - there is only one sampleEvent. > > I can easily extract the value required and can print it out from a JS223 > Post-processor/Listener etc, but I can't figure out where I can store the > value so it is picked up by the logging code. > I had thought of using another field such as the AssertionMessage but that > will get overwritten if there is an actual assertion on a particular step. > > For reference I am using the "-l, --logfile <argument>" command line > argument to configure the results logging.
Do you want to log those headers or should they be part of the results file? If you want to log them, then you can use the log object, that every JSR223 element gets injected. Those entries will be sent to the file jmeter.log. Maybe it helps, if you explain, why you want to "log" the header. That way, we can get a better understanding, how to help best. Felix > > > Cheers, > Owen > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
