How to create logs in java if the application stops abruptly,
Hi,
I wrote a java code for handling one of my applications in built commands. Right now iam handling the logs using an arrayList and at the end of my java progem iam writing them to a file.
If the program runs completely then my logs are generated, but my application takes almost 6hours to fully complete.. if ther is anyproblem like service of application stops or any other problem then i have to stop my java code forcefully.. in that case my code is not working ...like iam not able to see that part of my logs.
Help me in writing the logs even if the java code stops in between. or iam stopping it.
Thanks in adcance

