LOG entries getting lost, when i stop script

Bug reports.
User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

LOG entries getting lost, when i stop script

Post by slavikf » Mon Dec 13, 2010 10:16 pm

Correct me, if i wrong, but I see following behavior in Ranorex 2.3.5.10317:
I start my automation script, let it work for sometime, and then press stop button in Ranorex Studio.
Problem is, that all LOG entries are lost at this point and i can't see, what was going on.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: LOG entries getting lost, when i stop script

Post by Ciege » Mon Dec 13, 2010 10:19 pm

It could be that the log was not closed properly because you manually stopped the script.
Check the location of that the log file is supposed to exist and see if the file is there with a .tmp extension on it. If so, remove the .tmp extension so that the .xml or .rxlog extension is there. You should be good to go in this cause if indeed it is the issue.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

Re: LOG entries getting lost, when i stop script

Post by slavikf » Mon Dec 13, 2010 10:25 pm

Nope, can't see anything in "Reports" folder of my project. That 's where i see all LOG files and screenshots stored.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: LOG entries getting lost, when i stop script

Post by Ciege » Mon Dec 13, 2010 10:36 pm

Hmmm, I don't use Ranorex Studio but I assume it works the same way as in Visual Studio...

Did you or anyone happen to change where the log is getting saved to? Do you use the Report.Setup method?

Code: Select all

Report.Setup(ReportLevel.Debug, LogFile, true);
Ummm, shots in dark here: rights issue? Are you working on a different machine than before where it worked previously? Hard drive space issue? Not sure how Ranorex reporting supports the cases above, I would assume it would throw an exception but I am not positive of that.

Maybe use the Report.Setup method and purposely change where the report is getting saved. I have my own method that sets the LogFile variable to a Time/Date/ScriptName stamp so I never can run into a case that an existing logfile may be overwritten.

Hope you can figure it out, but I've never seen where a log file just disappears...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: LOG entries getting lost, when i stop script

Post by Support Team » Mon Dec 13, 2010 10:51 pm

slavikf wrote:Correct me, if i wrong, but I see following behavior in Ranorex 2.3.5.10317:
Have you every experienced a different behavior with another Ranorex version before?
slavikf wrote:I start my automation script, let it work for sometime, and then press stop button in Ranorex Studio.
Problem is, that all LOG entries are lost at this point and i can't see, what was going on.
It is indeed true that the report will not be shown when you press the "Stop Process" button in Ranorex Studio (not the "Stop" button in a recording which does show the report). The reason is that you kill the executed automation process and the process has no time to finish renaming the temporary report file to its final name.

So, what you can do is navigate to the place where your report file is stored (usually the same directory the executable is located in, e.g. the output folder when using Ranorex Studio) and you should find the temporary report file (*.tmp file extension) there. Just rename the "tmp" file extension to "rxlog" and you should be able to view the report.

Regards,
Alex
Ranorex Team
.
Image

User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

Re: LOG entries getting lost, when i stop script

Post by slavikf » Mon Dec 13, 2010 11:05 pm

Support Team wrote:Have you every experienced a different behavior with another Ranorex version before?
No, i didn't work with any previous versions.
Support Team wrote:It is indeed true that the report will not be shown when you press the "Stop Process" button in Ranorex Studio (not the "Stop" button in a recording which does show the report). The reason is that you kill the executed automation process and the process has no time to finish renaming the temporary report file to its final name.
Hm, that can be good candidate for feature request: Ranorex should save/recover LOG file, when "Stop Process" button pressed.
Ciege wrote:Do you use the Report.Setup method? Hard drive space issue? Not sure how Ranorex reporting supports the cases above, I would assume it would throw an exception but I am not positive of that.
Hope you can figure it out, but I've never seen where a log file just disappears...
No, i didn't use Report.Setup method.
No, it's not Hard disk space issue.
Support Team wrote:So, what you can do is navigate to the place where your report file is stored (usually the same directory the executable is located in, e.g. the output folder when using Ranorex Studio) and you should find the temporary report file (*.tmp file extension) there. Just rename the "tmp" file extension to "rxlog" and you should be able to view the report.
Yep, found it in DEBUG folder of my project. Thank you.
Would be nice, if Ranorex would do it for me.