From: Brett L. <wak...@gm...> - 2007-01-12 01:20:16
|
On Thu, 2007-01-11 at 20:50 +0100, Erik Vos wrote: > I'm considering to add log4j logging, to move > (or duplicate) the current console messages to > a log file. (This will not affect the Log Window, > which is actually a misnomer for a Game Report window). > > Any objections? > None. I like log files. They're good for bug reports. ;-) > Remain two questions: > > - how many loggers to create? > Perhaps simplest is one in the top of each class hierarchy. > One per package might be another approach, but then we would > need some central class with a protected static logger > for easy access by any class in each package. > I'm not very familiar with how loggers translate to log files. I don't think we need more than one log file just yet. So, probably a single static log class that's accessible by everyone most closely duplicates what we currently do. > - what configuration file? > Default is log4j.properties, but I am considering to > include the log4j properties in a common properties file. > This would require setting a system property on the command line > (if possible with a default in the main() method). > We definitely need our own configuration file, as we've discussed before. I think it's reasonable to expose a small subset of log4j settings in our configuration file. Typical settings would be things like to enable/disable logging to a file, logging verbosity, maximum log file size, etc. > One additional item I would like to include in such a file > would be a choice for the type of tile picture to use: > GIF or SVG. Today I worked on another PC where the SVG's > were not loaded yet, and it struck me again how much better > the GIFs looked. So I would like to be able to set that > as a preference. > That's fine. The SVG code needs fixing. Right now, we're not really leveraging the library as well as we could. ---Brett. |