|
From: doug s. <hig...@ho...> - 2013-06-02 18:27:49
|
>
>> Testing> -L --logfile <file>
>> 2. logfile. Freewrl has a -L --logfile <filename> option, generally saving what comes out on the console.>
> .
> I added a keyboard command in freewrl "`" toggleLogfile() to give a way to turn on/off logfile logging once running freewrl. This will help avoid a lot of system noise on startup, and bracket other verbose commands.
> - "`" - its the back-single-quote I have on all my PC keyboards, on a key shared with the ~ tilde character, above the left TAB key
> 1. if you specify a -L --logfile <name> on the command line it uses <name> for the logfile
> 2. if you specify no -L and are not in testing fixture or playback mode, it writes to logfile.log in the current working directory
> 3. if you are in testing -F --fixture or -P --playback mode AND:
> 3a) you specified a -N --nametest <nametest> then it writes to /fixture/nametest.log or /playback/nametest.log OR
> 3b) you did not specify -N --nametest, then it writes to /fixture/1_wrl.log or /playback/1_wrl.log for 1.wrl
> 3c) you specify a -L <name> on the commandline, it uses that.
.
4) if it's like #3 except your test scene has a KeySensor or StringSensor, then as with ESC for exit, the grave accent "`" is caught, and used for toggling logging (since it's exactly these test scenes -with no testable opengl graphics image- that need logging)
.
> .
> I tested on win32 and linux, and works.
> But warning to other platforms: it has a slightly platform specific way to toggle off logging:
> #ifdef _MSC_VER
> freopen("CON","w",stdout);
> #else
> freopen("/dev/tty", "w", stdout);
> #endif
> and this hasn't been tested on all platforms.
|