From: Stefan F. <ste...@we...> - 2010-07-16 21:17:38
|
I have added some bits of an initial configuration user interface. It should support the requirements discussed (it will allow to define both default profiles and user ajdusted profiles) and the UI will be adjustable via a xml file. It can be accessed from the Status Window => Config. Be aware that there is not much to see yet, but Rails still supports the definition of a user provided configfile via -Dconfigfile. I hope that everything else still works fine. Stefan |
From: Erik V. <eri...@xs...> - 2010-07-17 20:19:07
|
Apart from the recovery error message that I mentioned earlier today, I'm noticing a few more oddities since this morning: - the 18xx.log file suddenly appears in a different location than before. - during initialisation, the log shows an exception like: 2010-07-17 09:44:45 DEBUG Report pathname is log/1889_01_20100717.log (ReportBuffer openReportFile 120) 2010-07-17 09:44:45 ERROR Cannot open file log/1889_01_20100717.log (ReportBuffer openReportFile 126) java.io.FileNotFoundException: log\1889_01_20100717.log (The system cannot find the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileWriter.<init>(Unknown Source) at rails.game.ReportBuffer.openReportFile(ReportBuffer.java:124) >From the above 2 points. it looks like the working directory has changed or something. - my.properties suddenly appears to be declared legacy (well, that must be intentional ;) - I found a new file log4j.properties, which (if I understand the current Config code right) is now mandatory to get logging started. Or not so? BTW So far I have always run Rails via GameTest (now that's legacy!). Just checked RunGame, which seems to do the job as well for me. But that doesn't change the above findings. Erik. -----Original Message----- From: Stefan Frey [mailto:ste...@we...] Sent: Friday 16 July 2010 23:18 To: Development list for Rails: an 18xx game Subject: [Rails-devel] Added prototype configuration UI I have added some bits of an initial configuration user interface. It should support the requirements discussed (it will allow to define both default profiles and user ajdusted profiles) and the UI will be adjustable via a xml file. It can be accessed from the Status Window => Config. Be aware that there is not much to see yet, but Rails still supports the definition of a user provided configfile via -Dconfigfile. I hope that everything else still works fine. Stefan ---------------------------------------------------------------------------- -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2010-07-17 21:17:33
|
Erik: this seems to be an example of the Java paradigm: write once, debug everywhere... So the first questions are: * What was your configured setup? Did you use specific config file or did you use the standard my.properties? * Is the 18xx.log created in the current working directory as specified in the log4j.properties. Maybe you have different settings for the log4j.properties part than in default my.properties: Short explanation: - I separated the log4j settings from all the other Rails settings, as I assume that the log4j should not be edited by the user via a GUI. I can add a command line argument, that allows to pipe in a different log4j settings file. Next questions: * In my.properties the report options are all deactivated, thus on my PC the report file is not saved. It again seems that the Further explanation on the config mechanism: * The attributes, helptext etc. of the config options are defined in data/properties.xml * Configuration settings are collected as profiles, which are still Properties objects. There is a two layer structure: Default profiles, which ship with Rails .jar (which provides standard settings for pbem and ftp play) and user profiles, which collect user adjustments of the default profiles. * (A list of) Available user and default profiles are stored in default.profiles (stored in the jar) and user.profiles (which are itself Properties objects) I have updated the repo to my current setup, which works well on my PC. Keep me updated, what is the current state for you. Sorry for the unconvience, but I think it is better to find problems early, than implementing something for a long time, which will not work on the other OSs Stefan On Saturday 17 July 2010 22:18:59 Erik Vos wrote: > Apart from the recovery error message that I mentioned earlier today, I'm > noticing a few more oddities since this morning: > > - the 18xx.log file suddenly appears in a different location than before. > > - during initialisation, the log shows an exception like: > 2010-07-17 09:44:45 DEBUG Report pathname is log/1889_01_20100717.log > (ReportBuffer openReportFile 120) > 2010-07-17 09:44:45 ERROR Cannot open file log/1889_01_20100717.log > (ReportBuffer openReportFile 126) > java.io.FileNotFoundException: log\1889_01_20100717.log (The system cannot > find the path specified) > at java.io.FileOutputStream.open(Native Method) > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileWriter.<init>(Unknown Source) > at rails.game.ReportBuffer.openReportFile(ReportBuffer.java:124) > > >From the above 2 points. it looks like the working directory has changed > > or > > something. > > - my.properties suddenly appears to be declared legacy (well, that must be > intentional ;) > > - I found a new file log4j.properties, which (if I understand the current > Config code right) is now mandatory to get logging started. Or not so? > > BTW So far I have always run Rails via GameTest (now that's legacy!). Just > checked RunGame, which seems to do the job as well for me. But that > doesn't change the above findings. > > Erik. > > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Friday 16 July 2010 23:18 > To: Development list for Rails: an 18xx game > Subject: [Rails-devel] Added prototype configuration UI > > I have added some bits of an initial configuration user interface. > It should support the requirements discussed (it will allow to define both > default profiles and user ajdusted profiles) and the UI will be adjustable > via a xml file. > It can be accessed from the Status Window => Config. > Be aware that there is not much to see yet, but Rails still supports the > definition of a user provided configfile via -Dconfigfile. > I hope that everything else still works fine. > Stefan > > --------------------------------------------------------------------------- >- -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2010-07-17 22:17:25
|
Stefan, No, I use a separate properties file (called my_my.properties), because my.properties is linked to Subversion so I cannot tweak it. That's why I need the -Dconfigfile option. Now I find to my dismay that log4j.properties has been split off. But for the same reason I cannot tweak log4j.properties either, so I would need an additional command-line parameter to select my specific version of log4j.properties (which, by the way, contains an absolute path to the log file). I have tried to fix that by changing Config to set the log4j.configuration system property back to the configfile setting (i.e. my_my.properties) in case configfile is set, but that didn't remove the use of log4j.properties. But that's the way I would like to have it. Erik. -----Original Message----- From: Stefan Frey [mailto:ste...@we...] Sent: Saturday 17 July 2010 23:17 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] Added prototype configuration UI Erik: this seems to be an example of the Java paradigm: write once, debug everywhere... So the first questions are: * What was your configured setup? Did you use specific config file or did you use the standard my.properties? * Is the 18xx.log created in the current working directory as specified in the log4j.properties. Maybe you have different settings for the log4j.properties part than in default my.properties: Short explanation: - I separated the log4j settings from all the other Rails settings, as I assume that the log4j should not be edited by the user via a GUI. I can add a command line argument, that allows to pipe in a different log4j settings file. Next questions: * In my.properties the report options are all deactivated, thus on my PC the report file is not saved. It again seems that the Further explanation on the config mechanism: * The attributes, helptext etc. of the config options are defined in data/properties.xml * Configuration settings are collected as profiles, which are still Properties objects. There is a two layer structure: Default profiles, which ship with Rails .jar (which provides standard settings for pbem and ftp play) and user profiles, which collect user adjustments of the default profiles. * (A list of) Available user and default profiles are stored in default.profiles (stored in the jar) and user.profiles (which are itself Properties objects) I have updated the repo to my current setup, which works well on my PC. Keep me updated, what is the current state for you. Sorry for the unconvience, but I think it is better to find problems early, than implementing something for a long time, which will not work on the other OSs Stefan On Saturday 17 July 2010 22:18:59 Erik Vos wrote: > Apart from the recovery error message that I mentioned earlier today, I'm > noticing a few more oddities since this morning: > > - the 18xx.log file suddenly appears in a different location than before. > > - during initialisation, the log shows an exception like: > 2010-07-17 09:44:45 DEBUG Report pathname is log/1889_01_20100717.log > (ReportBuffer openReportFile 120) > 2010-07-17 09:44:45 ERROR Cannot open file log/1889_01_20100717.log > (ReportBuffer openReportFile 126) > java.io.FileNotFoundException: log\1889_01_20100717.log (The system cannot > find the path specified) > at java.io.FileOutputStream.open(Native Method) > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileWriter.<init>(Unknown Source) > at rails.game.ReportBuffer.openReportFile(ReportBuffer.java:124) > > >From the above 2 points. it looks like the working directory has changed > > or > > something. > > - my.properties suddenly appears to be declared legacy (well, that must be > intentional ;) > > - I found a new file log4j.properties, which (if I understand the current > Config code right) is now mandatory to get logging started. Or not so? > > BTW So far I have always run Rails via GameTest (now that's legacy!). Just > checked RunGame, which seems to do the job as well for me. But that > doesn't change the above findings. > > Erik. > > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Friday 16 July 2010 23:18 > To: Development list for Rails: an 18xx game > Subject: [Rails-devel] Added prototype configuration UI > > I have added some bits of an initial configuration user interface. > It should support the requirements discussed (it will allow to define both > default profiles and user ajdusted profiles) and the UI will be adjustable > via a xml file. > It can be accessed from the Status Window => Config. > Be aware that there is not much to see yet, but Rails still supports the > definition of a user provided configfile via -Dconfigfile. > I hope that everything else still works fine. > Stefan > > --------------------------------------------------------------------------- >- -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel ---------------------------------------------------------------------------- -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2010-07-17 22:37:52
|
Erik, I used (and still do) the same and this (should) still be supported by the -Dconfigfile option. I have added a -Dlog4j option that can specify a file, which contains the log4j settings. It can point to the same file as -Dconfigfile. Going forward the -Dprofile option will allow to switch between different configuration profiles, which are ajdustable by the GUI. I hope it works now. Stefan On Sunday 18 July 2010 00:17:24 Erik Vos wrote: > Stefan, > > No, I use a separate properties file (called my_my.properties), because > my.properties is linked to Subversion so I cannot tweak it. > That's why I need the -Dconfigfile option. > > Now I find to my dismay that log4j.properties has been split off. But for > the same reason I cannot tweak log4j.properties either, so I would need an > additional command-line parameter to select my specific version of > log4j.properties (which, by the way, contains an absolute path to the log > file). > > I have tried to fix that by changing Config to set the log4j.configuration > system property back to the configfile setting (i.e. my_my.properties) in > case configfile is set, but that didn't remove the use of log4j.properties. > But that's the way I would like to have it. > > Erik. > > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Saturday 17 July 2010 23:17 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Added prototype configuration UI > > Erik: > this seems to be an example of the Java paradigm: > write once, debug everywhere... > > So the first questions are: > * What was your configured setup? Did you use specific config file or did > you > use the standard my.properties? > > * Is the 18xx.log created in the current working directory as specified in > the > log4j.properties. Maybe you have different settings for the > log4j.properties > > part than in default my.properties: > > Short explanation: > - I separated the log4j settings from all the other Rails settings, as I > assume that the log4j should not be edited by the user via a GUI. > I can add a command line argument, that allows to pipe in a different log4j > settings file. > > Next questions: > * In my.properties the report options are all deactivated, thus on my PC > the > > report file is not saved. It again seems that the > > Further explanation on the config mechanism: > * The attributes, helptext etc. of the config options are defined in > data/properties.xml > > * Configuration settings are collected as profiles, which are still > Properties > objects. There is a two layer structure: Default profiles, which ship with > Rails .jar (which provides standard settings for pbem and ftp play) and > user > > profiles, which collect user adjustments of the default profiles. > > * (A list of) Available user and default profiles are stored in > default.profiles (stored in the jar) and user.profiles (which are itself > Properties objects) > > I have updated the repo to my current setup, which works well on my PC. > Keep me updated, what is the current state for you. > > Sorry for the unconvience, but I think it is better to find problems early, > than implementing something for a long time, which will not work on the > other > OSs > > Stefan > > On Saturday 17 July 2010 22:18:59 Erik Vos wrote: > > Apart from the recovery error message that I mentioned earlier today, I'm > > noticing a few more oddities since this morning: > > > > - the 18xx.log file suddenly appears in a different location than before. > > > > - during initialisation, the log shows an exception like: > > 2010-07-17 09:44:45 DEBUG Report pathname is log/1889_01_20100717.log > > (ReportBuffer openReportFile 120) > > 2010-07-17 09:44:45 ERROR Cannot open file log/1889_01_20100717.log > > (ReportBuffer openReportFile 126) > > java.io.FileNotFoundException: log\1889_01_20100717.log (The system > > cannot find the path specified) > > at java.io.FileOutputStream.open(Native Method) > > at java.io.FileOutputStream.<init>(Unknown Source) > > at java.io.FileOutputStream.<init>(Unknown Source) > > at java.io.FileWriter.<init>(Unknown Source) > > at rails.game.ReportBuffer.openReportFile(ReportBuffer.java:124) > > > > >From the above 2 points. it looks like the working directory has changed > > > or > > > > something. > > > > - my.properties suddenly appears to be declared legacy (well, that must > > be intentional ;) > > > > - I found a new file log4j.properties, which (if I understand the current > > Config code right) is now mandatory to get logging started. Or not so? > > > > BTW So far I have always run Rails via GameTest (now that's legacy!). > > Just checked RunGame, which seems to do the job as well for me. But that > > doesn't change the above findings. > > > > Erik. > > > > > > -----Original Message----- > > From: Stefan Frey [mailto:ste...@we...] > > Sent: Friday 16 July 2010 23:18 > > To: Development list for Rails: an 18xx game > > Subject: [Rails-devel] Added prototype configuration UI > > > > I have added some bits of an initial configuration user interface. > > It should support the requirements discussed (it will allow to define > > both default profiles and user ajdusted profiles) and the UI will be > > adjustable via a xml file. > > It can be accessed from the Status Window => Config. > > Be aware that there is not much to see yet, but Rails still supports the > > definition of a user provided configfile via -Dconfigfile. > > I hope that everything else still works fine. > > Stefan > > --------------------------------------------------------------------------- > > >- -- > > This SF.net email is sponsored by Sprint > > What will you do first with EVO, the first 4G phone? > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > --------------------------------------------------------------------------- > > >--- This SF.net email is sponsored by Sprint > > What will you do first with EVO, the first 4G phone? > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > --------------------------------------------------------------------------- >- -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2010-07-18 17:07:28
|
Stefan, Your fix didn't work yet, because logging was initialised (by creating a logger in Config) before the relevant system property was set. I have changed Config by deferring logger initialisation until just after the system property is set, and now I'm fine. Erik. -----Original Message----- From: Stefan Frey [mailto:ste...@we...] Sent: Sunday 18 July 2010 00:38 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] Added prototype configuration UI I have added a -Dlog4j option that can specify a file, which contains the log4j settings. It can point to the same file as -Dconfigfile. |
From: Stefan F. <ste...@we...> - 2010-07-18 17:35:09
|
Erik, sorry for the confusion. The explanation is below. I did a few changes on Config at the same time of your fix. Unfortunately the merge mechanism was totally confused by some other changes (import statements, white space) from your side, thus I had to integrate the fix manually. Could you please check that it still works. Two remarks: * Please replace the -Dlog4j= option with -Dlog4j.configuration= to set your user-defined log4j configuration file. Does not make much sense to use one system property to write it to another already defined by log4j. * Unfortunately I only tested mine with a copy of log4j.properties, but did not change anything the file content. The program worked before, but only by chance: I have used the default name for a log4j configuration file, thus even if log4j.configuration was not set, it fell back automatically to that file. Thanks, Stefan On Sunday 18 July 2010 19:07:23 Erik Vos wrote: > Stefan, > > Your fix didn't work yet, because logging was initialised (by creating a > logger in Config) before the relevant system property was set. I have > changed Config by deferring logger initialisation until just after the > system property is set, and now I'm fine. > > Erik. > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Sunday 18 July 2010 00:38 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Added prototype configuration UI > > I have added a -Dlog4j option that can specify a file, which contains the > log4j settings. It can point to the same file as -Dconfigfile. > > > > --------------------------------------------------------------------------- >--- This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2010-07-18 17:47:15
|
-----Original Message----- From: Stefan Frey [mailto:ste...@we...] Sent: Sunday 18 July 2010 19:35 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] Added prototype configuration UI Unfortunately the merge mechanism was totally confused by some other changes (import statements, white space) from your side, [EV]. Yes, I have noticed that the commit messages I'm getting from SVN abound of unnecessary formatting and import-collapsing differences. Not sure what the cause is. I did change my Eclipse version recently, together with the change to SVN, but I have transferred the formatting rules. In any case, I always have collapsed imports when there are >=3 classes of the same package, and have used spaces in stead of tabs. Not sure what went wrong. Two remarks: * Please replace the -Dlog4j= option with -Dlog4j.configuration= to set your user-defined log4j configuration file. Does not make much sense to use one system property to write it to another already defined by log4j. [EV] Yes, that makes sense! Works fine. Erik. |