Elvas Tower: MG95 will not run with a Log File - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

MG95 will not run with a Log File Rate Topic: -----

#1 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 06 April 2021 - 06:33 AM

The latest MG release, MG95, will not run with a log file on my system. It posts an error, saying: "System.UnauthorizedAccessException:Access to the path 'C\Users\Sid\Desktop\OpenRailsLog.txt' is denied." This had happened on my system with some earlier MG releases, but deleting the existing log file always allowed the program to operate successfully with a new Log file. I posted the bug, and have had some discussion about it.
I wonder whether this has happened to other users, or is it due to something in my system setup (Windows 10 Pro, Version 20H2, Build 19042.867)?

#2 User is offline   steved 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,827
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 06 April 2021 - 07:10 AM

I don't have this problem but then I capped the windows version to 1909.
If your version was recently updated you can revert back. I think you have two weeks or so.

Randy


#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 06 April 2021 - 07:29 AM

Sid, this might also be a problem caused by the Antivirus.

#4 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 06 April 2021 - 08:10 AM

But can be another place for saving a *.log-file referred?

#5 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,404
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 06 April 2021 - 08:33 AM

Currently there is no easy method for a user to choose another location for the desktop log file. ( especially if you don't know how to access the code )

from a discussion with Chris:

Quote

I've since looked in the code to find that both the path and the filename can be set by the user (along with the screenshots and the activity evaluation). The names of the fields are: LoggingPath and LoggingFilename

Sadly, there is no user interface to change these from the defaults. Instead, you can either edit the Windows Registry or follow Markus instructions here

Hope that helps, Chris Jakeman
Open Rails Management Team


I tried the method Markus proposed and couldn't get it to work. I've always thought that having the log on the desktop was a good idea --- it's an excellent troubleshooting aid. However, the problem Sid posted does appear to be a common problem among users....it's always popping up in the threads. I don't know if it's practical to have a users choice location for the log and still have it generated to the desktop.

#6 User is offline   steved 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,827
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 06 April 2021 - 08:53 AM

It would be handy to be able to pick the save location and have a time stamp in the file name.
My $.02.


#7 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,857
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 06 April 2021 - 10:09 AM

 Weter, on 06 April 2021 - 08:10 AM, said:

But can be another place for saving a *.log-file referred?

Yes, Weter, a different location can be specified but setting it up currently requires either the use of an INI file or editing the Windows Registry.
It would be an improvement if this option were easy to use.

#8 User is offline   perpetualKid 

  • Fireman
  • Group: Status: Active Member
  • Posts: 190
  • Joined: 10-June 18
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 06 April 2021 - 10:12 AM

while not documented, the Logging Path actually is customizable, just not in the options menu. You'd need to use registry editor (regedit), go to Computer\HKEY_CURRENT_USER\SOFTWARE\OpenRails\ORTS, and create a new string value named "LoggingPath". Than you can set the value to whatever folder you want, and next time the log file should go there.

Attached thumbnail(s)

  • Attached Image: LoggingPath.jpg


#9 User is offline   perpetualKid 

  • Fireman
  • Group: Status: Active Member
  • Posts: 190
  • Joined: 10-June 18
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 06 April 2021 - 10:28 AM

 steved, on 06 April 2021 - 08:53 AM, said:

It would be handy to be able to pick the save location and have a time stamp in the file name.
My $.02.



and even that is possible - similar as my other post above, you can customize the file name as well.
In same place in registry (regedit), create a string value named "LoggingFileName". Now you can set the filename, such as "{4} - MyLogFileName {0} {3}.txt".

While you can use any constant file name, mind the placeholders "{0}" etc. Each of them will be replaced with a specific variable at runtime:

{0} = the product name ("Open Rails")
{1}, {2} and {3} = differnt kind of Version Info
{4} = Date/Time (yy/mm/dd hh.mm.ss in your local date/time format). Invalid filename characters will be replaced by dot '.' so 04/06/21 becomes 04.06.21 etc.

each placeholder value can be used multipe times if needed in the filename pattern, such as "{4} filename {4}.txt"

#10 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,404
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 06 April 2021 - 11:13 AM

 perpetualKid, on 06 April 2021 - 10:12 AM, said:

while not documented, the Logging Path actually is customizable, just not in the options menu. You'd need to use registry editor (regedit), go to Computer\HKEY_CURRENT_USER\SOFTWARE\OpenRails\ORTS, and create a new string value named "LoggingPath". Than you can set the value to whatever folder you want, and next time the log file should go there.

Okay, I opened the registry and created a LoggingPath as directed...it worked. However, I don't think this should be the only choice for many users, going into the registry and creating new string values...surely an option for this could be coded somewhere in "Options"?


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users