I am using log4j for logging. I want that whenever any exception comes in the application it should get printed in the log file. I am not able to find way to do this. Can you please help me? here is the l4j.properties I have created:
Thanks for the response Jaikiran, the method with Throwable as argument is working fine
One more problem which I have to resolve. In the code, many times exception may come which has not been handled. I want in case of any exception the track trace should get printed to the log file, the way its done on the console. Is this possible with Log4j?