Hi Ceki, > Simon, > > The BasicConfigurator is just a way to get log4j to print something > very quickly. For more flexibility you can configure log4j > programmatically or use configuration files. > > To set the level of the root logger to INFO level just do: > > Logger.getRootLogger().setLevel(Level.INFO); > > I feel very bad about rejecting your contribution but I am afraid that > is the right thing to do.
on one side you are right, on the other it is most convinient for the log4j user (think especially of a new user)when he don't have to do the stuff programmatical and therefore has not to learn a lot about the Api For simple settings BasicConfigurator for more complicated one of the file-based configurator. So Everything a starter needs to now, is how to use a Configurator, How to get a Instance of a Category (Logger), how to log something. As more convinient the "jump-in" for a new user is, as higher is the acceptance of the packet. But i think to the basic setting belongs teh Log Level also. There is just a "convinience-gap" between the Basic- and File-Based Configurators. When follow your argumentation consequently - just to get some printout - you should deprecate the configure(Appender appender) method also, because the configure() method is more than enough for this on any machine. Just think it over again. If yopu are still against it, I wont be mad at you. [...] > > As a general rule, helper classes, libraries, non-top level components > should not attempt to configure log4j. Configuring log4j is the > responsibility of the end-user or generally the application > deployer. Whenever possible, a library should not try to configure > logging but leave it to the deployer. After all, logging output is > useful only if someone will take the time to look at them. If the > end-user wishes to log then she should control the logging > configuration. Nevertheless, it is helpful if the library developper > provides documentation on logging, preferably with working examples. > Because of the responibilkity of the enduser log configuration shoud be freely configurable, also in "out of the box" software. for this you need sometimes a more complicated config loading procedure. This is where this problem arise. Byer Simon -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>