Howto make Ranorex log to the current working directory?

Ranorex Studio, Spy, Recorder, and Driver.
gajewes
Posts: 1
Joined: Tue Oct 26, 2021 3:46 pm

Howto make Ranorex log to the current working directory?

Post by gajewes » Sat Nov 20, 2021 8:52 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} ... ?

Thanks in advance.

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Howto make Ranorex log to the current working directory?

Post by Stub » Mon Nov 29, 2021 12:44 pm

Is "currentdir" valid? Perhaps ProjectDir or SolutionDir would be a better basis for a path, or even OutDir/TargetDir/and so forth. Lots to choose from.

User avatar
doke
Posts: 112
Joined: Fri Mar 29, 2019 2:33 pm

Re: Howto make Ranorex log to the current working directory?

Post by doke » Tue Nov 30, 2021 10:12 am

when running ranorex from command line :
https://www.ranorex.com/help/latest/ran ... execution/

you should be able to add parameter
/rf|reportfile:<path name>\||<file name>

Regards,

Don