I am using log4j.xml in a web application , when I do the following the logs are created but the logs are not written
Stop the application server.
Add war file to deployments folder.
Start the application server.
But , when I do the following the logs are created and also logs are populated as expected.
Start the application server without any war in it.
then add the war file , it gets deployed.
Did you check the configuration log4j.xml file is actually refreshed in the deployments folder.
Try adding a dummy commented line in log4j property or xml file and see if it getting refreshed after deployment.
BTW, what do you mean by logs are "created" and logs are "written"? What's the difference?
If you are not laughing at yourself, then you just didn't get the joke.