Friday, December 11, 2009

Log4j with Helma

Helma uses apache commons logging as its logging abstraction layer and for production use I always use log4j as the actual logging system.
Up til now I've been annoyed that changing the the log4j config file has needed bouncing the Helma instance to re-read the config file.
Of course thats only a misconception born out of not having had the time to properly read the documentation (which is actually quite poor for log4j, thats why I bought the Log4j Complete Manual years ago) and not really paying attention to the fact that apache commons faq clearly says that you should just use the underlying logging systems configuration mechanisms.

So what all that really means is the next time I need to make a change to my production logging config, all I need to do is use the Helma /manage console to just run:

var pkgconf = Packages.org.apache.log4j.PropertyConfigurator;
pkgconf.configure("/path/to/the/log4j.conf");

0 Comments:

Post a Comment

<< Home