I am running log4j in a webapplication. But when I try to undeploy the app, the application does not get undeployed completely and cleanly. The log4j.properties file stays on the server, all other files are deleted from the webapp's folder.
How do I ensure that this file is released when the webapp is undeployed. LogManager.shutdown() in the method contextDestroyed(ServletContextEvent sce) does not seem to stop the logging.