I have written a log4j wrapper for my web application. The log4j properties are present in a xml file that I parse using the DOMConfigurator object. I do this during application startup and everything works fine. Now I am writing a simple application (not a web-application) that has some main java programs and these will be called using unix shell scripts that will be scheduled to run at particular times in the day. I want to implement logging for this application. Can I use log4j? If I can, when should i do the DOMConfigurator.configure. I do not have any application startup/ bootstrap loader.