I wrote one selenium automation javascript in JMeter using a webdriver sampler. 

In that, I try to find the total time taken for traversing from first page to last page of the website. 

To print time or particular message I used `WDS.log.info()` function.

When running this script I got output in the `.log` file. Now, I want to save every log file separately for every transaction? 

How we can achieve this?

Or is there any other idea to print or save my script result (which was generated in the log file) in a new file with each transaction?