Board index FlightGear Support Tools FGRun

Logging to file with fgrun ?

FGRun is a no-longer maintained graphical frontend to run FlightGear.

Logging to file with fgrun ?

Postby NicQ » Tue Feb 24, 2009 8:37 pm

Wondering how to enable logging to a file from fgrun, or more generally, how to pass arbitrary command arguments to fgfs from fgrun ?
In this case, a redirection (>) to a logfile.
I've seen on the wiki they suggest the environment section of the Advanced dialog in fgrun, but that has never worked for me : not only, the options don't appear on the command line, they seem to be completely ignored.
Some tips would be much appreciated, thanks in advance,
Cheers !
Nic

P.S : Investigating what just happened while flying the English Lightning (latest cvs version of a/c) with fredb's exe from Feb 15th. Autopilot was not enabled and the plane seemed to be on autopilot, or someone else took control of it, if that's possible :)
Ignored some inputs but not other (and no, it was not ignore all joystick, but accept mouse or keyboard, it was weird. And started in flight)
Edit: pretty sure I hit the replay shortcut by mistake, and that was the source of not being able to control the Lightning, hehe. A Doh! moment ;)
If it ain't broke, break it. How else are you going to figure out how it works ?
Callsign: C-NICQ, amateur FGFS military and aerobatic test pilot, pushing the envelope since 2009 (sic)

FGFS Gallery
Birds Of Gear, a blog
NicQ's Workshop
NicQ
 
Posts: 429
Joined: Wed Jan 21, 2009 10:30 pm
Location: Montreal, Qc, Canada

Re: Logging to file with fgrun ?

Postby Hooray » Wed Feb 25, 2009 9:52 pm

I am not really using fgrun, and I don't think fgrun provided any such option the last time I checked, but why can't you just run fgfs from a console?

While there was a related feature request posted on the fgrun tracker almost 4 years ago: http://sourceforge.net/tracker/index.ph ... tid=510696 I am not really sure if that's the right way to do it, it would be far better to simply have an additional option to optionally save console output to a file from within fgfs. This would probably also address latency issues related to excessive console output. This could be something like --log-file=problem.txt

I think this would also be better than an idea mentioned on the wiki:
Add an additional command line parameter --log-startup=file.log to automatically log all startup messages at maximum log (bulk) level until main loop is running, this will make it easier for users to provide useful debug information


Because this idea would only be specific to logging info during startup, while simply logging all info would be way more generic and informative.
If you are only interested in startup log info, one could simply terminate the process after startup.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Logging to file with fgrun ?

Postby NicQ » Wed Feb 25, 2009 11:07 pm

Hooray wrote:I am not really using fgrun, and I don't think fgrun provided any such option the last time I checked, but why can't you just run fgfs from a console?


Because I change options all the time, and fgrun is convenient :)
That said, I did try, and wasn't able to redirect the console output to a file.
Used to engines having an console.log (or equivalent) file that mirrors the windows console output, as it's a well known difficutly on win32 to redirect a built-in console's output at runtime



While there was a related feature request posted on the fgrun tracker almost 4 years ago: http://sourceforge.net/tracker/index.ph ... tid=510696 I am not really sure if that's the right way to do it, it would be far better to simply have an additional option to optionally save console output to a file from within fgfs. This would probably also address latency issues related to excessive console output. This could be something like --log-file=problem.txt


If console window is dropped, then make fgfs behave as one would expect, and leave it to the user to redirect output. Fgrun can then set itself up to capture it. Adding a rich text control to capture the output on win32 to fgfs is not a good idea imho.
If that much effort goes into it, might as well use one of the de-facto standards on win : keep the console at least in debug builds, if not release, plus by default send its output to a console.log file (enabled by default and non blocking)

I think this would also be better than an idea mentioned on the wiki:
Add an additional command line parameter --log-startup=file.log to automatically log all startup messages at maximum log (bulk) level until main loop is running, this will make it easier for users to provide useful debug information

Because this idea would only be specific to logging info during startup, while simply logging all info would be way more generic and informative.
If you are only interested in startup log info, one could simply terminate the process after startup.


Agreed, as if it's done right, it's not going to lead to performance degradation : many twitch games have file logging of console output enabled by default, or easily toggled on, and it's not just for startup :)
If it ain't broke, break it. How else are you going to figure out how it works ?
Callsign: C-NICQ, amateur FGFS military and aerobatic test pilot, pushing the envelope since 2009 (sic)

FGFS Gallery
Birds Of Gear, a blog
NicQ's Workshop
NicQ
 
Posts: 429
Joined: Wed Jan 21, 2009 10:30 pm
Location: Montreal, Qc, Canada


Return to FGRun

Who is online

Users browsing this forum: No registered users and 0 guests