How to make Ranorex log to the current working directory?

Ranorex Spy, Recorder, and Studio.
fk4rx
Posts: 3
Joined: Mon Oct 09, 2017 12:49 pm

How to make Ranorex log to the current working directory?

Post by fk4rx » Thu Jan 21, 2021 3:53 pm

Hello

By default, Ranorex writes log files to %USERPROFILE%\Documents\Ranorex\Logs , i.e. the log files from Ranorex Studio and those from testsuite executions. For internal reasons, I need to have the logs from testsuite executions in the current working directory of the testsuite. So, following the advice from older posts, I changed 2 lines in all 4 nlog.config files which I found in the Ranorex installation dir like this:

Original:
fileName="${specialfolder:folder=MyDocuments}/Ranorex/Logs/${processname}.log"

Edited:
fileName="${currentdir}/${processname}.log"

However, after rebuilding my solution and running my testsuite, the logs are still written to the original directory. Does anybody have an idea what's wrong? Maybe the nlog version used by Ranorex does not support ${currentdir} ... ?

Thank you!